Permissions on directories for file uploads? [duplicate]

Posted on

Permissions on directories for file uploads? [duplicate] – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, apache-2.2, chmod, , .

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.

Solution :

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.

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

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.

Leave a Reply

Your email address will not be published. Required fields are marked *