How do I set "access permissions" for a file or folder on my web server?
The methods you can use to set access permissions depend on whether you have terminal, Telnet, SSH, FTP or SFTP access to your server, and whether your web host offers a control panel or file manager.Using FTP or SFTP

Notice the octal number, 755, at the bottom. The first digit is for the owner, or "User", of the file or folder; the second is for the group (the only member of which is often the owner); and the third digit is for everyone else with access to the server, or "World". Each digit is the total of 4 for read access, 2 for write access, and 1 for execute access, for example, 7 for full access, 5 for read and execute only, 6 for read and write only, 4 for read only, etc.
- Your FTP or SFTP client must support setting access permissions.
- Your server must support setting access permissions using FTP or SFTP. Servers running UNIX and UNIX-like operating systems (Linux, BSD, etc.) are the most likely to support this functionality.
- Log in to your server using your (S)FTP client.
- Locate and select the file or folder whose access permissions you wish to set.
- Find the feature in your (S)FTP for setting access permissions. This may be a menu item named "Access Permissions" or something similar, or it may be less obvious--for example, a menu item named "Get info" or "Properties". Each (S)FTP client is different, and some do not support this feature at all.
- Select the desired access permissions and click "Apply", "OK", or do whatever is appropriate to apply the new settings.
Using Telnet, SSH, or a terminal connected directly to the server
If you can connect to your server using a Telnet or SSH client, or have access to a terminal connected directly to your server, and your server is running UNIX or a UNIX-like operating system (Linux, BSD, etc.), then you can set access permissions using the "chmod" command. If you have access to a terminal connected directly to a Windows-based server, you can use Windows Explorer to set access permissions.Using chmod
To use the chmod command:- Log in to your server using a Telnet or SSH client, or at a terminal connected directly to the server.
- Unless you already know the full path to the file or folder whose access permissions you wish to set, locate it. (Instructions for how to do that may be added here later).
- Type "chmod [permissions] [path to file or folder]", changing "[permissions]" to the appropriate number (see note below), and "[path to file or folder]" to the full path to the file or folder whose access permissions you with to set, or the relative path to it from where you are, and press the return key. For example, to give the owner of "/home/myusername/data/clients.txt" read and write access, and no access to anyone else, type "chmod 600 /home/myusername/data/clients.txt" (without the quote marks) and press the return key.
Using Windows Explorer
To use Windows Explorer (not Internet Explorer) to set access permissions using a terminal connected directly to the server:- Log in to the server.
- Launch Explorer.
- Locate the file or folder whose access permissions you wish to set.
- Click it with the right mouse button to bring up the contextual menu.
- Select "Properties" from the contextual menu.
- Find the permissions settings, and set them as desired. You may need to click a tab, such as the "Security" tab, to find the settings.
- Click "OK" or "Apply".
- To enable the appropriate level of access for web browsers, you may also need to set access permissions in your web server software. (Explanation of how to do that may be added here later.)
Using your web host's control panel or file manager
Some, but not all control panels and file managers provided by web hosts enable you to set access permissions for your files and folders. The details of how to do it vary widely from system to system, but generally speaking, you will do something like this:- Log in to your web host's control panel or file manager.
- Locate the file or folder whose access permissions you wish to set.
- Find the control for bringing up the screen for setting access permissions. It may be a button or icon on the same line as the file or folder name, or you may need to check a checkbox on the same line as the file or folder name and then find a button at the top of bottom of the list of files.
- Once you've brought up the screen for setting access permissions, set them as desired and click "OK" or whatever the button is labeled that applies the settings.