I use CentOS 5.5, and SVN 1.4.2

I use a working copy on my server as my webapplication, so that I can easily deploy the new code. But what really bothers me, is the fact, that every time I do an svn up (or svn update) I have to reset the file permission.

How can I solve that? I actually don't like to create an svn post-commit-hook. Is there any way to tell CentOS that newly added/changed files within certain files should always have certain permissions?


Have you tried with file acl (facl)? You can set default permissions for the new files in a folder.

#set acl for a file: 
setfacl -m u:Usuario:rwx filex
#set default acl for new files in directory
setfacl -dm u:usuario:rmx directory

Use -R option for recursive setfacl.

  • +1, also a reminder that many filesystems will need to be mounted with ACL support enable, which is done by adding "acl" to the options list in /etc/fstab. – Daniel Lawson Mar 27 '11 at 0:33
  • Thanks, but he gives me the following: -bash: setfacl: command not found – paskster Mar 27 '11 at 12:02
  • 1
    CentOS/RedHad generally install acl package by default but if it doesnt you can install it from yum using: yum install acl as root – CronosNull Mar 27 '11 at 15:31

The only way I was able to do this is via a post-commit hook. Here are the ones I use:


Basically, you need to install them in the hooks/ directory in your repo. Add the following to your post-commit (after line 27) to make your changes:

# Make sure ownership and permissions are correct is correct
chown myuser.mygroup -R $DIR_TO_TEST_VHOST
chmod 777 -R $DIR_TO_TEST_VHOST

Hope that helps.


svn propset svn:executable ON filename.php

or use CornerStone file property

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.