

InterviewSolution
Saved Bookmarks
1. |
Solve : need broswer to run shell script w/root perms.? |
Answer» I have a shell script that copies from our QA system to the Production system. (same server actually, just different directories). I would like to add a "chown -R apache:apache $1" to the script to insure that files in the Production system will be able to be REPLACED by the copy script. The ownership in Production is VARIABLE, depending upon the WEBSITE. I've had advice to make the copy script (in cgi-bin) owned by root:root, then to do a chmod 4755. Well, it's just not working. If I test it as the root user, works fine. If I test it as the web-server user (apache) I get all kinds of permissions errors. I thought the chmod 4755 to do the "setuid" on the script would solve this. --------LATER---------- I've discovered the "setgid" bit, and MAYBE that's what I want to set on the destination directory. But there again, I need to be able to execute a setgid on a directory, using a script executed by apache (php exec command). Thanks, -- Maeve |
|