I am trying to figure out how to set permissions on my server.
I run a web site where the user uploads pictures.
Pictures are stored in /pictures
If user "joe" with id 545 uploads a picture, the picture must go to /pictures/545/picname.jpg
Because a directory is created on the fly when the user uploads, I guess I have no choice to set permission 0777 on directory pictures. Is it right?
The sub dir 545 (/pictures/545) will inherit the same permission, so it will also be 777.
By setting permission to 777, I think I am creating a huge security hole. Is there a way to do not set permission to 777?
Pictures are uploaded with account nobody.
My admin account is not a root account.