What is the normal chmod?

James picture James · Mar 30, 2009 · Viewed 45k times · Source

On my web server, my file permissions are all over the place and I want to 'reset' everything back to how it originally was. I don't want any users to be able to come in and delete things off my web server! I just want them to be able to look at php pages etc.

What chmod should I use?

Answer

carl picture carl · Mar 30, 2009

They should be as restrictive as possible, but no more.

Usually 0644 is a good choice, which gives the owner read and write rights, but everybody else only read. 0755 for directories. But, it can depend on your specific system settings.