You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Henrik Ripa <gi...@yahoo.com> on 2004/07/26 23:54:07 UTC

Permission flag t set on newly created repositories

Hi

I'm new to subversion and I'm trying to set up a repository server under linux
(Debian) to be accessable from windows. It's going fairly well. I have one
question though.

I tried out the new fsfs fs-type just now and got the following error message
when trying to commit the first file:

 D:\SubVersion\fsfs>svn ci -m "first commit to an fsfs repository"
 Adding         nytt.txt
 Transmitting file data .svn: Commit failed (details follow):
 svn: MERGE request failed on '/svn/test_fsfs'
 svn:
 Can't move '/public/subversion/test_fsfs/db/current.tmp'
 to '/public/subversion/test_fsfs/db/current': Operation not permitted

Which is clearly a permission problem. To cut a long story short I tracked it
down to the fact that the repository had the following permissions set:

 0:gieron@subnav...rsion/test_fsfs: ls -ld . db db/current*
 drwxrwsr-t    7 gieron   svn          4096 Jul 27 01:41 .
 drwxrwsr-t    5 gieron   svn          4096 Jul 27 01:16 db
 -rw-rw-r--    1 gieron   svn             6 Jul 27 01:13 db/current
 -rw-rw-r--    1 www-data svn             6 Jul 27 01:16 db/current.tmp

The problem is that t permission flag at the end which tells the system (if I
understand it correctly) that a user cannot remove another users files despite
them having write access to the directory.

'svnadmin create' always sets this flag on all directories in a newly created
repository. Why is that? I can't think of any reason for doing this.

The commit worked after using this command:

 0:gieron@subnav...rsion/test_fsfs: sudo chmod -R o-t *


=====
Henrik Ripa [Gieron] - Lule/Norrbotten/Sweden

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

Re: Permission flag t set on newly created repositories

Posted by Henrik Ripa <gi...@yahoo.com>.
--- Greg Hudson <gh...@MIT.EDU> wrote:

> On July 26 you wrote to users@subversion.tigris.org:
> > 'svnadmin create' always sets this flag on all directories in a
> > newly created repository. Why is that? I can't think of any reason
> > for doing this.
> 
> Sorry this sat for so long without a response.  The sticky bit is set
> in new directories due to a bug in the version of APR shipped with
> httpd 2.0.50, which is also the version we ship in 1.0.6 and 1.1.0-rc2
> (I believe).  We have a workaround for that APR bug scheduled for
> 1.1.0-rc3.

No problem. When I didn't get a response from the list I traversed the source.
Since I couldn't find anything about it in the source I actually guessed that
it had something to do with APR. Now I know. I now use this script named
svnmkrepos to create new repositories:

#!/bin/sh
svnadmin create --fs-type=fsfs $1
chmod -R o-t $1
chgrp -R svn $1
find $1 -type d | xargs chmod g+s

All Subversion users are in group svn of course.


=====
Henrik Ripa [Gieron] - Lule/Norrbotten/Sweden

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

Re: Permission flag t set on newly created repositories

Posted by Greg Hudson <gh...@MIT.EDU>.
On July 26 you wrote to users@subversion.tigris.org:
> 'svnadmin create' always sets this flag on all directories in a
> newly created repository. Why is that? I can't think of any reason
> for doing this.

Sorry this sat for so long without a response.  The sticky bit is set
in new directories due to a bug in the version of APR shipped with
httpd 2.0.50, which is also the version we ship in 1.0.6 and 1.1.0-rc2
(I believe).  We have a workaround for that APR bug scheduled for
1.1.0-rc3.

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