You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jacob C <ja...@keystreams.com> on 2005/08/23 00:11:55 UTC

Read-only files in .svn causing problems w/ move + delete

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

For some reason whenever I add and commit a new directory to subversion it creates read-only files in the new .svn directory. For example, here is a
listing of one particular .svn directory:

[root@enigma-purple .svn]# uname -a
Linux *********** 2.6.8.1-12mdksmp #1 SMP Fri Oct 1 11:24:45 CEST 2004 i686 AMD Athlon(TM) MP 1900+ unknown GNU/Linux
[root@enigma-purple .svn]# ls -la
total 5242880
drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 .
drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 ..
- -r--r--r--  1 jacobc jacobc   0 Aug 22 17:50 empty-file
- -r--r--r--  1 jacobc jacobc 348 Aug 22 17:52 entries
- -rwxr--r--  1 jacobc jacobc   2 Aug 22 17:52 format
drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 prop-base
drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 props
- -r--r--r--  1 jacobc jacobc 118 Aug 22 17:52 README.txt
drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 text-base
drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 tmp
drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 wcprops

I don't necessarily have a problem with this except that when I go to move or delete directories under sunbversion control I invariably get permission
denied errors and the commit 'half' fails - meaning, it seems to make the changes in subversion but my working copy becomes a bit mangled...

The following is a 'round-about' log of my previous attempt at moving a directory:

[root@enigma-purple]# ls
branches  tag  trunk
[root@enigma-purple]# svn move tag tags
A         tags
D         tag
[root@enigma-purple]# ls
branches  tag  tags  trunk
[root@enigma-purple]# svn commit -m "Renamed 'tag' directory to 'tags'"
svn@XXXXX's password:
Deleting       tag
Adding         tags
svn: Commit succeeded, but other errors follow:
svn: Error bumping revisions post-commit (details follow):
svn: Can't remove '/mnt/media/code/project/tag/.svn/entries'
svn: Can't remove file '/mnt/media/code/project/tag/.svn/entries': Permission denied

*******
This is where things got messy and I'm including the log of commands I went through trying to figure out a solution. Not really concerned w/ what I
did wrong here but thought I would include this to show how I eventually remedied the problems caused by the above:
*******

[root@enigma-purple]# chmod 777 /mnt/media/code/project/tag/.svn/entries
[root@enigma-purple]# svn commit -m "Renamed 'tag' directory to 'tags'"
svn: Working copy '/mnt/media/code/project' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
[root@enigma-purple]# svn cleanup
[root@enigma-purple]# svn commit -m "Renamed 'tag' directory to 'tags'"
svn@XXXXX's password:
Adding         tags
svn: Commit failed (details follow):
svn: Out of date: '/project/tags' in transaction 'a'
[root@enigma-purple]# ls
branches  tag  tags  trunk
[root@enigma-purple]# svn delete tag
svn: Use --force to override this restriction
svn: 'tag' is not under version control
[root@enigma-purple]# rm -fr tag
rm: cannot remove `tag/.svn/empty-file': Permission denied
rm: cannot remove `tag/.svn/README.txt': Permission denied
rm: cannot remove `tag/.svn/log': Permission denied
[root@enigma-purple]# chmod 777 tag/.svn/*
[root@enigma-purple]# rm -fr tag
[root@enigma-purple]# svn status
A  +   tags
[root@enigma-purple]# svn add tags
svn: warning: 'tags' is already under version control
[root@enigma-purple]# svn commit -m "Renamed 'tag' directory to 'tags'"
svn@XXXXX's password:
Adding         tags
svn: Commit failed (details follow):
svn: Out of date: '/project/tags' in transaction 'b'
[root@enigma-purple]# svn update
svn@XXXXX's password:
Permission denied, please try again.
svn@XXXXX's password:
svn: Failed to add directory 'tags': object of the same name already exists
[root@enigma-purple]# svn commit -m "Renamed 'tag' directory to 'tags'"
svn@XXXXX's password:
Adding         tags
svn: Commit failed (details follow):
svn: Out of date: '/project/tags' in transaction 'c'
[root@enigma-purple project]# svn delete tags
svn: Use --force to override this restriction
svn: 'tags' has local modifications
[root@enigma-purple project]# svn --force delete tags
svn: Can't remove 'tags/.svn/empty-file'
svn: Can't remove file 'tags/.svn/empty-file': Permission denied
[root@enigma-purple project]# chown -R 777 tags/.svn/*
chown: changing ownership of `tags/.svn/empty-file': Operation not permitted
chown: changing ownership of `tags/.svn/entries': Operation not permitted
chown: changing ownership of `tags/.svn/README.txt': Operation not permitted
chown: changing ownership of `tags/.svn/text-base': Operation not permitted
chown: changing ownership of `tags/.svn/wcprops': Operation not permitted
[root@enigma-purple project]# chmod -R 777 tags/.svn/*
[root@enigma-purple project]# svn --force delete tags
svn: Working copy '.' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
[root@enigma-purple project]# svn cleanup
[root@enigma-purple project]# svn status
?      tags
!      .
[root@enigma-purple]# ls
branches  tags  trunk
[root@enigma-purple]# rm -fr tags
[root@enigma-purple]# svn update
svn@XXXXX's password:
A  tags
Updated to revision 7.
[root@enigma-purple]# ls
branches  tags  trunk

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDCmnLxH//K8zMNc4RAqoOAKCFyKptkPIFnURTMAWR24iK5ixCVQCfdbaS
Dz+ZnwlweMqyDM83bQIHZhk=
=D/6e
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Read-only files in .svn causing problems w/ move + delete

Posted by Branko Čibej <br...@xbc.nu>.
Ryan Schmidt wrote:

> And yet, if you work as user jacobc, even though the permissions say  
> not to write to the files, it can, and it does. Why is that the case  
> for a normal user but not for root?

Subversion knows it created read-only files, and makes them writable 
before modifying them.

Some Unix flavours won't let you chmod a file unless you're its owner, 
even if you're root.

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Read-only files in .svn causing problems w/ move + delete

Posted by Ryan Schmidt <su...@ryandesign.com>.
On 23.08.2005, at 10:51, Stephan Zeissler wrote:

>>>> [root@enigma-purple .svn]# ls -la
>>>   ^^^^^^
>>>
>>>> total 5242880
>>>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 .
>>>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 ..
>>>> -r--r--r--  1 jacobc jacobc   0 Aug 22 17:50 empty-file
>>>> -r--r--r--  1 jacobc jacobc 348 Aug 22 17:52 entries
>>>> -rwxr--r--  1 jacobc jacobc   2 Aug 22 17:52 format
>>>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 prop-base
>>>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 props
>>>> -r--r--r--  1 jacobc jacobc 118 Aug 22 17:52 README.txt
>>>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 text-base
>>>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 tmp
>>>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 wcprops
>>>                ^^^^^^^^^^^^^^
>>>
>>> I bet this (^^^) is the problem. Did you checkout as another user
>>> (jacobc) and trying to work as root?
>>>
>>> Try to work with the same user on a working directory (seem to  
>>> does not
>>> matter whether on of them is root or not).
>>
>> That seems to have been the problem. Thanks. I didn't think that  
>> would be the cause since root, of course, can generally do  
>> whatever it wants to...
>
> Sure, it can modify the rights on every file. But if the rights say  
> "DO NOT WRITE TO THIS FILE", no programm does.
> The root user is just allowed to modify every flag on file, but it  
> does not do this automatically if you try to write to a file.

And yet, if you work as user jacobc, even though the permissions say  
not to write to the files, it can, and it does. Why is that the case  
for a normal user but not for root?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Read-only files in .svn causing problems w/ move + delete

Posted by Stephan Zeissler <st...@kuttig.com>.
Jacob C wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>
>That seems to have been the problem. Thanks. I didn't think that would be the cause since root, of course, can generally do whatever it wants to...
>
>
>
>Kalin KOZHUHAROV wrote:
>  
>
>>Jacob C wrote:
>>
>>    
>>
>>>Hello,
>>>
>>>For some reason whenever I add and commit a new directory to
>>>subversion it creates read-only files in the new .svn directory. For
>>>example, here is a
>>>listing of one particular .svn directory:
>>>
>>>[root@enigma-purple .svn]# uname -a
>>>Linux *********** 2.6.8.1-12mdksmp #1 SMP Fri Oct 1 11:24:45 CEST 2004
>>>i686 AMD Athlon(TM) MP 1900+ unknown GNU/Linux
>>>[root@enigma-purple .svn]# ls -la
>>>      
>>>
>>   ^^^^^^
>>
>>    
>>
>>>total 5242880
>>>drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 .
>>>drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 ..
>>>-r--r--r--  1 jacobc jacobc   0 Aug 22 17:50 empty-file
>>>-r--r--r--  1 jacobc jacobc 348 Aug 22 17:52 entries
>>>-rwxr--r--  1 jacobc jacobc   2 Aug 22 17:52 format
>>>drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 prop-base
>>>drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 props
>>>-r--r--r--  1 jacobc jacobc 118 Aug 22 17:52 README.txt
>>>drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 text-base
>>>drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 tmp
>>>drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 wcprops
>>>      
>>>
>>                ^^^^^^^^^^^^^^
>>
>>I bet this (^^^) is the problem. Did you checkout as another user
>>(jacobc) and trying to work as root?
>>
>>Try to work with the same user on a working directory (seem to does not
>>matter whether on of them is root or not).
>>
>>Kalin.
>>
>>    
>>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.2.4 (GNU/Linux)
>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>iD8DBQFDCqAKxH//K8zMNc4RAtjZAJsEP7jDA00p/4tuSrNldCay8MImPgCaAywa
>IrnWfsuqI8nAKfyja5Eh3eQ=
>=zN7k
>-----END PGP SIGNATURE-----
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: users-help@subversion.tigris.org
>
>  
>
Sure, it can modify the rights on every file. But if the rights say "DO 
NOT WRITE TO THIS FILE", no programm does.
The root user is just allowed to modify every flag on file, but it does 
not do this automatically if you try to write to a file.

Greetings,
 Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Read-only files in .svn causing problems w/ move + delete

Posted by Jacob C <ja...@keystreams.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


That seems to have been the problem. Thanks. I didn't think that would be the cause since root, of course, can generally do whatever it wants to...



Kalin KOZHUHAROV wrote:
> Jacob C wrote:
> 
>> Hello,
>>
>> For some reason whenever I add and commit a new directory to
>> subversion it creates read-only files in the new .svn directory. For
>> example, here is a
>> listing of one particular .svn directory:
>>
>> [root@enigma-purple .svn]# uname -a
>> Linux *********** 2.6.8.1-12mdksmp #1 SMP Fri Oct 1 11:24:45 CEST 2004
>> i686 AMD Athlon(TM) MP 1900+ unknown GNU/Linux
>> [root@enigma-purple .svn]# ls -la
> 
>    ^^^^^^
> 
>> total 5242880
>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 .
>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 ..
>> -r--r--r--  1 jacobc jacobc   0 Aug 22 17:50 empty-file
>> -r--r--r--  1 jacobc jacobc 348 Aug 22 17:52 entries
>> -rwxr--r--  1 jacobc jacobc   2 Aug 22 17:52 format
>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 prop-base
>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 props
>> -r--r--r--  1 jacobc jacobc 118 Aug 22 17:52 README.txt
>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 text-base
>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 tmp
>> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 wcprops
> 
>                 ^^^^^^^^^^^^^^
> 
> I bet this (^^^) is the problem. Did you checkout as another user
> (jacobc) and trying to work as root?
> 
> Try to work with the same user on a working directory (seem to does not
> matter whether on of them is root or not).
> 
> Kalin.
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDCqAKxH//K8zMNc4RAtjZAJsEP7jDA00p/4tuSrNldCay8MImPgCaAywa
IrnWfsuqI8nAKfyja5Eh3eQ=
=zN7k
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Read-only files in .svn causing problems w/ move + delete

Posted by Kalin KOZHUHAROV <ka...@thinrope.net>.
Jacob C wrote:
> Hello,
> 
> For some reason whenever I add and commit a new directory to subversion it creates read-only files in the new .svn directory. For example, here is a
> listing of one particular .svn directory:
> 
> [root@enigma-purple .svn]# uname -a
> Linux *********** 2.6.8.1-12mdksmp #1 SMP Fri Oct 1 11:24:45 CEST 2004 i686 AMD Athlon(TM) MP 1900+ unknown GNU/Linux
> [root@enigma-purple .svn]# ls -la
    ^^^^^^
> total 5242880
> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 .
> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 ..
> -r--r--r--  1 jacobc jacobc   0 Aug 22 17:50 empty-file
> -r--r--r--  1 jacobc jacobc 348 Aug 22 17:52 entries
> -rwxr--r--  1 jacobc jacobc   2 Aug 22 17:52 format
> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 prop-base
> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 props
> -r--r--r--  1 jacobc jacobc 118 Aug 22 17:52 README.txt
> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 text-base
> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 tmp
> drwxr-xr-x  1 jacobc jacobc   0 Aug 22 17:50 wcprops
                 ^^^^^^^^^^^^^^

I bet this (^^^) is the problem. Did you checkout as another user 
(jacobc) and trying to work as root?

Try to work with the same user on a working directory (seem to does not 
matter whether on of them is root or not).

Kalin.

-- 
|[ ~~~~~~~~~~~~~~~~~~~~~~ ]|
+-> http://ThinRope.net/ <-+
|[ ______________________ ]|


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org