Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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.