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

Re: Unix file permissions

From: Phil Endecott <spam_from_subversion_users_at_chezphil.org>
Date: 2005-12-01 19:40:19 CET

Shawn Matlock wrote:
> Can Subversion keep the assigned permissions on a file?

Your best bet is to record the permissions that you want in properties, i.e.

$ ls -l foo
-rw-r--r-- 1 phil phil 1024 foo

$ svn propset owner phil foo
$ svn propset group phil foo
$ svn propset mode 644 foo

Then have a script that you can run after updating that reads and
applies the properties:

#!/bin/sh

for i in *
do
   chmod `svn propget mode $i` $i
   chown `svn propget owner $i`.`svn propget group $i` $i
done

(The above is pseudo-code, don't expect it to "just work".)

Subversion does have the svn:executable property, which has set some
sort of precident for integrating this sort of thing. People who, for
example, version-control their /etc files need something like this. A
client-side post-update hook script would work -- but a wrapper like the
above around svn update has the same effect.

--Phil.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 1 20:12:03 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.