Changing chmod for files but not directories

You, UnixChmod
Back

For security reasons the files inside a web server should be 644 or lower, 644 is good because otherwise Web Server it self cannot read the file. So here is a small piece of code to change the file mode just to the files not to the folders.

find . -type f -print0 | xargs -0 chmod 644
© Heshan Wanigasooriya.RSS

🍪 This site does not track you.