Explaining File Permissions
All files and directories on a server have specific permissions. These permissions determine who can view or modify the data.
You can adjust these permissions via FTP, SSH, or through the hosting control panel under File Manager.
All our hosting packages run inside isolated containers. Changing file permissions does not affect the access rights of other customers.
File permissions explained
Choosing file permissions
Setting file permissions
Need assistance?
Our servers use the Linux/Unix filesystem, where permissions are indicated by a three-digit code:
âšī¸ Note: Execute permission does not apply to PHP scripts â they can run as long as the webserver has access. File permissions are still critical for Perl scripts.
In the File Manager, you can see the user (UID) and group (GID) ownership of files and directories.
Default permissions:
Files: 644
Directories: 755
Adjust when needed:
Write to a directory via PHP â 775
Write to a file via PHP â 664
You can adjust permissions via:
Control panel:
In DirectAdmin (Web/Reseller Hosting) or Plesk (WordPress Hosting).
FTP client:
Connect using FTP and adjust permissions (e.g., in FileZilla).
SSH:
Use commands to modify file and directory permissions.
Basic SSH commands:
File:
Directory:
Directory and contents:
Set all files and directories at once:
Files:
Directories:
đ Important: Do not run these commands above the domains/ directory to avoid disrupting system files like email and logs!
Need help fixing file permissions?
Feel free to contact us â we're happy to assist you!
You can adjust these permissions via FTP, SSH, or through the hosting control panel under File Manager.
All our hosting packages run inside isolated containers. Changing file permissions does not affect the access rights of other customers.
File permissions explained
Choosing file permissions
Setting file permissions
Need assistance?
đ File permissions explained
Our servers use the Linux/Unix filesystem, where permissions are indicated by a three-digit code:
Code | Meaning | Representation |
---|---|---|
0 | No permissions | --- |
1 | Execute only | --x |
2 | Write only | -w- |
3 | Write + execute | -wx |
4 | Read only | r-- |
5 | Read + execute | r-x |
6 | Read + write | rw- |
7 | Full permissions | rwx |
âšī¸ Note: Execute permission does not apply to PHP scripts â they can run as long as the webserver has access. File permissions are still critical for Perl scripts.
đ ī¸ Choosing file permissions
In the File Manager, you can see the user (UID) and group (GID) ownership of files and directories.
Default permissions:
Files: 644
Directories: 755
Adjust when needed:
Write to a directory via PHP â 775
Write to a file via PHP â 664
Code | Permissions | |
---|---|---|
644 | Read/write for owner, read-only for group/others | (files) |
664 | Read/write for owner and group, read-only for others | (files) |
666 | Read/write for everyone | (not recommended) |
755 | Full access for owner, read/execute for group/others | (directories) |
775 | Full access for owner and group, read/execute for others | (directories) |
777 | Full access for everyone | (not recommended) |
âī¸ Setting file permissions
You can adjust permissions via:
Control panel:
In DirectAdmin (Web/Reseller Hosting) or Plesk (WordPress Hosting).
FTP client:
Connect using FTP and adjust permissions (e.g., in FileZilla).
SSH:
Use commands to modify file and directory permissions.
Basic SSH commands:
File:
chmod 644 filename.php
Directory:
chmod 755 directoryname/
Directory and contents:
chmod -R 755 directoryname/
Set all files and directories at once:
Files:
find . -type f -exec chmod 0664 {} \;
Directories:
find . -type d -exec chmod 0775 {} \;
đ Important: Do not run these commands above the domains/ directory to avoid disrupting system files like email and logs!
đ¤ Need assistance?
Need help fixing file permissions?
Feel free to contact us â we're happy to assist you!
Updated on: 23/05/2025
Thank you!