Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Default file permission for web root (and new files)
What would be the best file permission to set to a web root folder (and all its content files / folders) and its new files? 755 is what suggesetd in this documentation (end of step one). But how to set it as a default permission for new files?
I have to execute this instruction to unsure my website and its static content can be delivered through http
chmod -R 755 /home/somsite/public_www
Everytime I create a new file (as a linux user or via FTP), I always need to execute this line once again because new files never have “read” permission for http requests.
Is there a way to tell server : “hey, all files in here, and all future files created can be read by anyone”?
I’m on ubuntu.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×