How to Change Attributes for all Files and Folders
How to Change Attributes for all Files and Folders in Linux
I am regularly working with WordPress and need to change the attributes of my files and folders so that it is locked down and secure. This is a two step process. I first change the attributes of all files to 644. Then I change the attributes of all folders to 755. However, you should decide what is best for you by reading the article on the Codex called Changing File Permissions if you are new to this topic.
This can be done from anywhere, since I always type out the full path to the location so I know I’m not making any mistakes. I enter the following to change all files:
sudo find [enter path here. ex: /var/www/wordpress] -type f -exec chmod 644 {} \;
And I follow that up by entering the following for folders:
sudo find [enter path here. ex: /var/www/wordpress] -type d -exec chmod 755 {} \;
And you’re done.
Related posts:
- Change Ownership of All Files and Folders in a Directory
- How to Show Hidden Files & Folders in Windows XP
- How to Change Which Program Opens Your JPG Files
- Allowing Uploads via the Media Uploader
- Displaying JPG files over a Mapped Drive
Comments
One Response to “How to Change Attributes for all Files and Folders”
That’s fantastic - I have been struggling with a similar problem myself and I was really not sure as to how to protect my folders properly at the same time as allowing proper access to the content - thanks Ubuntu