Best practice is only to allow users to read / write the files they need.
In my web applications, I have a data directory for a website that stores all my dynamically generated data from the application.
Then I give permission for the application to write to this directory, and nothing more.
source
share