"Chmod" command to set file and folder permissions and access permissions (setting values)

Introduction

Last time, I learned about the chmod command in "" chmod "command to set file and folder permissions and access rights". At that time, the permission of "Give execute permission to all users" was changed to "$ chmod a + x (file name)", but this time we will learn how to give permission with another command.

Express chmod as a set value

The settings are represented by integers from 0 to 7, respectively, in the order of owner, group, and so on. Each number is calculated by adding the following setting values. (It will be expressed in binary notation.) Can be read = 4 Can be written and changed = 2 Can be executed = 1

Let's change the file permissions

**-Remove read permission for other users **

command


$chmod 710 (file name) 

**-Give read / write execute permission to all users **

command


$chmod 777 (file name) 

in conclusion

I think it's enough to learn about chmod so far.

Recommended Posts

"Chmod" command to set file and folder permissions and access permissions (setting values)
"Chmod" command to set permissions and access permissions for files and folders
Adjust file permissions with the Linux command chmod
Linux file and directory permissions
How to use MBDyn (command setting)
Python memo ① Folder and file operations