🔐 File Permissions

How read, write, execute permissions work

What will chmod o-wx file.txt do to existing file permissions?
File permission triplets in Linux

File permission triplets in Linux

Show File Permissions

Use the -l flag to show file permissions:

file_type_config command line
ls -l

Change File Permissions

Add write access to a group

file_type_config command line
chmod g+w somefile.txt

Remove write access to a group:

file_type_config command line
chmod g-w somefile.txt

Add a specific file permission config, like readonly:

file_type_config command line
chmod g=r somefile.txt

Update file permissions with octal notation:

file_type_config command line
chmod 644 somefile.txt

Check out the chmod calculator to configure specific file permissions settings easily.

Questions? Let's chat

Open Discord