0

Possible Duplicate:
What are the best linux permissions to use for my website?

What is the correct way to set up directories to allow user uploads on Linux? My websites upload dir is 755, but Linux naturally doesn't let files be written to this directory except by the user. So should I change the directory to 777 or do some kind of group manipulation? Bare in mind, I don't want to open myself up to any security risks.

3 Answers3

0

if you let 777 will be risky for your server, better to create a folder pertinent owner and group permittions (like 775) and from y our application use the owner, so, you wont put yourself in risk.

jpganz18
  • 271
0

What about using ACLs on the selected directory area permitting the user R/W?

mdpc
  • 11,914
0

bindfs could help you. It is a FUSE filesystem which allows bind-mounting directories and altering and enforcing different permissions inside the mount point. If ACLs are too difficult for you to implement correctly, bindfs could be a solution. Beware of noticeable performance impact, though.

daff
  • 4,909