There are many ways to handle file sharing permissions in Linux/unix:
- Add the
developer user to the
deploy group, and set the script's permissions to allow read and execute for the group. e.g.
chmod 750 myscript.sh
- you may find in helpful to use linux "ACL" or access control lists, for instance instead of a
developer user, you have a
developer group, with many members. You can add an ACL to a sort of
bin directory owned by
deploy that automatically gives new files the read and execute permissions to the
- the benefit of "ACLs", is that directories and files can "belong" to more than one user or group, and inheritance properties can be added to directories, so new files "inherit" the applicable ACL permissions of the parent dir
In some cases, you may shy away from ACLs, because they're a special filesystem feature that may not be available on the FS you're using, or may be missed during a backup.
In the first case you're out of luck. You have to make a group specifically for the purpose of running these scripts, add your
developers to it, and remember to
chmod the relevant scripts upon creation. (all parent dirs must be readable AND executable by the relevant users)