chmod -R 777 .

This is one of the thing I hate to see, recursively changing everything to 777 👿

If you want to give read access to all, then 644 is enough for files and 755 for directories. If you want to give execution permission too, you could give 755 to executable files.

Also sometimes you have files with special permission like suid or guid bit (to run as the owner instead of to run as the run user), so it would be best to use relative (go+r) to make the file readable to group and others.

Therefore I prefer relative change. Still there is one thing I do not want, is making every file executable…

Ok, here it is

chmod -R a+rX .

note the big X 🙂 we change recursively all files and dirs to be readable, and we set the executable flag ONLY IF the file is executable for the owner !

2 thoughts on “chmod -R 777 .

  1. Brian Tkatch

    Laurent, shame on you, writing the title first and then in the article expecting it to have been read. Trying to become a PHB? 🙂

    Article title’s should be written after the article. Why does everyone have that box on top?

  2. Pingback: chmod -R 777 . | Oracle

Leave a Reply

Your email address will not be published.