What Is “chmod 755” and How To Use It?

In Linux the chmod command is used to change permissions for files and directories. The chmod can be used to set owner, group and other permissions by using read , write and execute . These permissions can be used in different ways where the chmod 755 is popular permission used by system administrators. Simply the “chmod 755” sets the specified files and folders permissions as users can read, write, execute, groups can read and execute, others can read and execute.

chmod 755 Meaning

Let’s take a look at the “chmod 755” in detail. The 755 values are equal to the “rwxr-xr-x”. We can event list this permission with the ls -l command like below.

$ ls -l

chmod u=rwx,go=rx

The chmod command can use different expression types in order to express different permissions. The “chmod 755” is very easy to use and read to set different permissions. But characters can be also used to set the permission 755. As stated previously the 755 means users can read, write, execute, groups can read and execute, others can read and execute. This permission can be expressed with the characters like u=rwx,go=rx and can be used like below.

$ chmod u=rwx,go=rx myfile

chmod 755 Recursively

The chmod 755 can be used to change file permissions recursively. The -r option is used to change permissions to 755 recursively. This can be a current directory or a specified path to set all files and folders permission to 755.

$ chmod -r 755 /home/ismail/myfiles

chmod 755 Verbose

Also, the files and folders permissions can be set to 755 in verbose mode. Verbose mode lists all permission changes and is generally used with the recursive option. The -v option is used as verbose mode.

$ chmod -r -v 755 /home/ismail/myfiles
See also  chown Command Tutorial

Leave a Comment