In this guide, we show you how to change the permissions of the files and folders (directories) on your web space with an FTP client.
By setting the file permissions, you determine who can read, write and execute. If the permissions are too strict, things on your site will stop working. If the permissions are too loose, everyone can do everything which is unsafe.
- Step 1 - Log in using SFTP (or FTP)
- Step 2 - Select all files and folders
- Step 3 - Change permissions for files
- Step 4 - Change permissions for folders (directories)
Step 1 - Log in using SFTP (or FTP)
As FTP client, we use FileZilla, and instead of FTP, we connect with SFTP because it is encrypted and more secure If you use another client things will look slightly different.
Open Filezilla and enter the following login details, replacing your-domain.com with your own domain:
- Host: ssh.your-domain.com (or ftp.your-domain.com for FTP)
- Username: your-domain.com
- Password: the password you have chosen for SFTP (or FTP)
- Port: 22 (or 21 for FTP)
Click Quickconnect.
Tip: You may need to enable SFTP access in your from the One.com control panel, and, if you are logging into SFTP or SSH for the first time on this computer, you need to approve the connection.
Step 2 - Select all files and folders
- Select all the files and folders that you want to set the permissions for. In most cases, you can select all of them.
- Right-click on the selected folders and select File permissions in the menu that appears.
Step 3 - Change permissions for files
First, we will set the permissions for files.
- For Numeric value type in 644.
- Check the box Recurse into subdirectories.
- Select Apply to files only.
Step 4 - Change permissions for folders (directories)
Finally, we will set the permissions for folders, or directories as they are also called. In folders you need to be able to execute, so that's why the setting is different than for files.
- For Numeric value type in 755.
- Check the box Recurse into subdirectories.
- Select Apply to directories only.
That's it; you are all done!
Related articles: