Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

make svn maintain the file permission

I have some scripts that are supposed to be executable. But after it is checked into svn and checked out in another location, they lose their executable permission. One has to chmod it again. Even if one changes its permission already, next time when svn updates it, it loses its permission again. Is there a way to get around this?

Thanks!

like image 803
CuriousMind Avatar asked Mar 29 '12 19:03

CuriousMind


People also ask

Does SVN store file permissions?

Graham, svn doesn't store permissions. Your only option is to wrap your call to svn in a script. The script should call svn with its arguments, then set the permissions afterward. Depending on your environment, you might need to call your script svn and tweak your PATH to ensure it gets called.

How do I set permissions 755?

Use chmod -R 755 /opt/lampp/htdocs if you want to change permissions of all files and directories at once.

How do I restrict access in SVN?

As @jpierson already answered, you can use authz files to define No Access, Read Only or Read Write rules on repository paths. Repository path can represent repository root and any path within repository. I.e. you can specify access rules not only subtrees (folders) but files as well.


1 Answers

You need to inform SVN that the file should be executable:

svn propset svn:executable ON filename

and then commit this change.

like image 110
jofel Avatar answered Oct 13 '22 00:10

jofel