Articles on: General
This article is also available in:

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?


📚 File permissions explained



Our servers use the Linux/Unix filesystem, where permissions are indicated by a three-digit code:

CodeMeaningRepresentation
0No permissions---
1Execute only--x
2Write only-w-
3Write + execute-wx
4Read onlyr--
5Read + executer-x
6Read + writerw-
7Full permissionsrwx


â„šī¸ 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

CodePermissions
644Read/write for owner, read-only for group/others(files)
664Read/write for owner and group, read-only for others(files)
666Read/write for everyone(not recommended)
755Full access for owner, read/execute for group/others(directories)
775Full access for owner and group, read/execute for others(directories)
777Full 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

Was this article helpful?

Share your feedback

Cancel

Thank you!