Skip to content

How to change file permissions and ownership in Linux

Linux

FAQ · Linux · Help & Support

07. Sep 2023 1 min

File permissions and ownership in Linux are crucial for system security and data integrity. On Linux, you usually use the chmod command for permissions and chown for ownership.

1. Connect to the server via SSH.
2. Use the command ls -l to see a file's current permissions and owner.
3. Change the permissions with chmod [permissions] [filename]. You can use numeric (e.g. 755) or symbolic (e.g. a+r) notation.
4. Change the owner and group of a file or directory with chown [newowner]:[newgroup] [filename].
5. To change permissions recursively, add the -R option.
6. This way you can also change the permissions of all files and subdirectories in a directory at once.
7. Use the command stat [filename] to get detailed information about a file's permissions and ownership.

Still have questions?

Our support team is happy to help - via ticket, email, or phone.