[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

inconsistent state after permission denied on svn add

From: Mikel Ward <mikel_at_mikelward.com>
Date: Tue, 13 May 2008 16:11:18 +1000

I have a subdirectory that an automated process writes to as another
user (publishing of my Blogger blog).

Both I and the other user belong to a common group.

I was supposed to have group write permissions on all the
subdirectories, but due to a missing setgid bit or wrong umask or
something like that, a subdirectory ended up owned by the other user
and I had no write permissions.

I didn't realize this, and tried to do an svn add.

It broke things.

Here's how to reproduce it.

$ pwd
/home/mward
$ whoami
mward
$ svnadmin create testrepo
$ mkdir testdata
$ cd testdata
$ svn co svn+ssh://localhost/home/mward/testrepo .
Checked out revision 0.
$ mkdir testdir
$ cd testdir
$ echo 'Testing' > testfile
$ cd ..
$ sudo useradd testuser
$ sudo chown testuser testdir
$ ls -al
total 24
drwxr-xr-x 4 mward mward 4096 2008-05-07 10:14 .
drwxr-xr-x 111 mward mward 12288 2008-05-07 10:12 ..
drwxr-xr-x 6 mward mward 4096 2008-05-07 10:12 .svn
drwxr-xr-x 2 testuser mward 4096 2008-05-07 10:13 testdir
$ svn add testdir
svn: Can't create directory 'testdir/.svn': Permission denied
$ sudo chmod g+w testdir
$ svn add testdir
svn: warning: 'testdir' is already under version control
$ svn stat testdir
svn: Directory 'testdir/.svn' containing working copy admin area is missing
$ svn ci testdir
svn: '/home/mward/testdata/testdir' is not a working copy
svn: Can't open file '/home/mward/testdata/testdir/.svn/entries': No
such file or directory

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-13 21:34:54 CEST

This is an archived mail posted to the Subversion Dev mailing list.