I’d like to share a useful function within Filezilla to change all the file permissions within an FTP controlled file system. Very handy if you want to update all the permissions for a website.
My problem started when I used Heart Internet’s website restore function. I was actually installing a website for the first time but the restore function works just as well when adding a brand new website to an empty hosting account instead of using FTP which is way slower.
The upload worked fine so I added the database and updated the configuration to use the new domain and environment only to find all the files had the wrong file permissions. It seems the website restore function adds all the files with 666 file permissions when I’m requiring 644.
Heart Internet provides allot of useful tools but not one which would change all the file permissions on mass. They have a file browser which can change file permissions but its limited to one file at a time, not good when I had over 10,000! So after some thinking I turned to Filezilla. When right clicking on the public_html folder I had the choice to change the permissions, it also provides further options to recursively change files and / or folders within public_html. So I selected the required file permissions + recursively update files and hit save! Filezilla then started doing its stuff until all the files had new permissions, I refreshed the site and everything was working as it should.
- Right click on public_html or the root folder of your website
- Enter 644 or the required permissions into the ‘Numeric value’ box provided
- Click ‘Recurse into subdirectories
- Make sure ‘Apply to file only’ is selected
- Press OK
This is a good solution and I’m still using this method successfully.