tags:

views:

34

answers:

1

I have a bunch of SVN managed files with permission 664. The files aren't necessarily owned by me, but they're in my primary group. (I can only write to them because they're in my group.) when I "svn update" that folder it changes the owner of any changed files to me (fine, who cares) and removes group-write permission on the file, leaving the permissions in its wake as 644, not 664. What's the deal?

I get that there's a property I could conceivably set that says "hey, make sure this file is executable when you check it out / export it", but no, I just want the damn thing to quit bjorking my permissions when I svn-update existing files.

Is this normal behavior for svn? Can I configure it to leave my permissions "as-is"?

+1  A: 

Try umask:

umask 002

From umask(2):

     The umask() routine sets the process's file mode creation mask to numask
     and returns the previous value of the mask.  The 9 low-order access per-
     mission bits of numask are used by system calls, including open(2),
     mkdir(2), mkfifo(2) and mknod(2) to turn off corresponding bits requested
     in file mode.  (See chmod(2)).  This clearing allows each user to
     restrict the default access to his files.
Greg Hewgill