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!
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.
Use chmod -R 755 /opt/lampp/htdocs if you want to change permissions of all files and directories at once.
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.
You need to inform SVN that the file should be executable:
svn propset svn:executable ON filename
and then commit this change.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With