views:

19

answers:

0

I am interested in knowing the proper, yet security-conscious settings for a directory. Here's my scenario:

  1. I have a username for FTP access to my server called "user".
  2. For the purpose of the scenario, PHP runs as "nobody" on my server.
  3. I have a directory off the document root called "sample".
  4. The "sample" directory is chmod'd at 0755 (drwxr-xr-x)
  5. "Sample" is owned by "user" and the group is set to "user"

The above is all very straight forward and standard.

So I want to have a script be able to create (mkdir) and delete (rmdir) directories under "sample". Yet, I don't want to obviously overly expose my server by opening up the permissions (I could easily chmod sample to 0777 and make it world write-able).

What is the best combination of permissions, owner settings and/or group settings to allow my script to create and delete directories under "sample" while retaining the ability for "user" to continue to FTP into the directory?

Thanks.

related questions