Meaning of Linux permissions

What are permissions?

# ls -la ~
dr-xr-x---. centos centos 4096 May   4 09:11 .

The description of dr-xr-x --- at the time of doing something is permission.

--File access rights --Controls the execute permission of sh and the write permission by PHP.

Actually I use it without knowing it well

I've been doing PG for a long time, but I haven't really investigated it. (Because it was a stray PG, I have never studied properly) It ’s squid. That's why I asked the person at work, so I make a memorandum

The meaning of each character

There are three types of first characters: -, d, and l.

letter meaning
- File
d directory
l Symbolic link

The following 9 characters r, w, and x can be replaced with numbers, respectively.

letter Numbers meaning
r 4 Read permission
w 2 Write permission
x 1 Execution authority
- 0 No authority

The sequence of letters is meaningful

--Yo with 3 character delimiters ―― ʻOwner ʻOwnerGroup ʻOther are arranged in this order. ―― ʻOwner It is the authority to allow the owner himself. --ʻOwnerGroup This is the authority to allow the group to which the owner belongs. ―― ʻOther It is the authority to allow other users.

The numbers are meaningful

--For example, if you say chmod 700 ., it will bedrwx ------. --In other words, the character value is specified as a numerical value. --In the case of the example, r + w + x is used to add up to 7, and the following is set to 00 to make it-.

I see

Let's remember it properly.

Recommended Posts

Meaning of Linux permissions
Meaning of Linux directory permissions
Linux permissions
Linux permissions in Java
Linux permissions [under investigation]
The meaning of self
[Linux] Installation of nvm
Incremental backup of Linux (restore)
Summary of Linux distribution types
Linux file and directory permissions
Japanese translation of Linux manual
A brief summary of Linux
Basic knowledge of Linux and basic commands
Confirm commit of Linux 5.7 Thermal Pressure ⁠
Installation of OMC Cloud Agent --Linux-
Completion of docker command on Linux
Linux
[Must-see for beginners] Basics of Linux
List of frequently used Linux commands
The meaning of ".object" in Django
Efficient use of Linux file system
Replacement of strings containing Linux spaces
[python] -1 meaning of numpy's reshape method
[Understanding in 3 minutes] The beginning of Linux
[Linux] Review of frequently used basic commands 2
[Linux] Summary of middleware version confirmation commands
[Linux] List of Linux commands used in practice
Meaning of deep learning models and parameters
[Bash / linux] Notes in case of trouble
A quick overview of the Linux kernel
Basic usage of Btrfs on Arch Linux
[Linux setting series] Prompt setting of bash. / prompt / bash / shell
Understand the "temporary" part of UNIX / Linux
Summary of petit techniques for Linux commands
[Linux] Review of frequently used basic commands
[Linux] Change of authority, owner, owning group
[GCC] [C / C ++] [Linux] Dump of GCC predefined macros
[Linux] Learn the basics of shell commands
Meaning of using DI framework in Python