Updated: 28 September 2026 · Applies to: AlmaLinux 9, Rocky Linux 9, Ubuntu 24.04 and Debian 12
Linux permissions decide who can read (r), write (w) and execute (x) a file: the owner (u), the group (g) and others (o).
chmod u+w file # owner may write chmod g+r file # group may read chmod o-rwx file # others get no access chmod 644 file # rw-r--r-- (typical web file) chmod 755 dir # rwxr-xr-x (typical folder or script) chmod -R 755 dir # apply to a folder and everything in it chown user:group file # change owner (root only)
Note: Avoid 777 (anyone can change the file). On web hosting, use 644 for files and 755 for folders.
Ucartz services for this topic
- KVM VPS hosting: NVMe SSD and full root access, with Free Basic Managed Support.
- Unmanaged dedicated servers: full root access and free IPMI KVM, with Free Basic Managed Support.
- Linux server management: hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.
