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


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

Was this article helpful?

Share your feedback

Cancel

Thank you!