Reputation: 569
I have a PHP Script running on Linux that requires 777 Permission to write into folders but this permission is such a risky one is there a way out to avoid that permission instead of the ability to write?
Thanks
Upvotes: 0
Views: 1423
Reputation: 36
Make that directory owned by your php script, likely by chown for www-data:www-data, and then assign 755, so only web user can write to it. Obviously, block directory listing on your web server for that directory.
Upvotes: 2