How To's

Change file permissions in Ubuntu

3,129 views · 1 found this helpful

Was this helpful?

Problem

Change file permissions.

tl;dr

chmod +rwx filename chmod +rwx foldername -r

Solution

Bash scripts must be set executable to run.

Read and write are also options for files to give respectively read or write access.

Basic file permission syntax:

chmod +x filename

This will grant execution rights to the file.

chmod +r filename

This will grant read access to a file.

chmod +w filename

This will grant write access to a file.

You can also do it recursively to an entire folder.

chmod +w foldername ­-r

  • Updated

← All articles

Still stuck?

Our engineers answer tickets directly, 24/7.