Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's my current structure:
  |- [files]
|- generated-folder-2/
  |- [files]
|- generated-folder-3/
  |- [files]

How do I set up permissions so that (which is kicked off via a POST; I can't really use sudo or anything like that) has permissions to create new folders and modify anything inside those folders, however the files inside each folder are 100% sandboxed?

Each generated folder is a git checkout (done by, from random people. I do my best to ensure no rogue files will be checked out, but I'm worried it's potentially possible a .php file or something might slip past me. In that case, I don't want it to have the ability to touch anything outside its own folder.

share|improve this question
up vote 0 down vote accepted

If does not run with root permissions, you could simply change the owner of the folders you do not want changed...

If there are more complicated requirements, let only write to a staging area and have another script do a vetted copy...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.