Why do my setuid root bash shell scripts not work?

There is a pretty comprehansive answer at https://unix.stackexchange.com/questions/364/allow-setuid-on-shell-scripts Bottom line is that there are two main points against it: A race condition between when the Kernel opens the file to find which interpreter it should execute and when the interpreter opens the file to read the script. Shell scripts which execute many external programs without … Read more

Correct owner/group/permissions for Apache 2 site files/folders under Mac OS X?

This is the most restrictive and safest way I’ve found, as explained here for hypothetical ~/my/web/root/ directory for your web content: For each parent directory leading to your web root (e.g. ~/my, ~/my/web, ~/my/web/root): chmod go-rwx DIR (nobody other than owner can access content) chmod go+x DIR (to allow “users” including _www to “enter” the … Read more