This question was flagged as duplicate, and I looked at the suggested question. It did not explain why there are four numbers instead of three. Like in WordPress. the folder permissions you should never set it to is 7777. What does the fourth number mean, and can someone provide a simple, lay person explanation?
I was reading an article here and it mentioned three sets of numbers ranging from 0 to 7.
Read = 4.
Write = 1.
Execute = 2.
To get read-write permissions, add 4 and 2 to get six, and to get read and execute, you add 4 and 1 to get 5. If you want write and execute, add 2 and 1 to get 3. To not set permissions, set it to 0, and to allow all permissions, set it to 7.
The article says three numbers are needed. The first number sas that you, the owner, are given permission. The second number is for the group that the account is a part of. The third number is for everyone else. For example, the number 750 indicates that I, the owner can do everything, everyone in my group can read and execute, and anyone else who is not in my group cannot access it. However, I have seen four numbers instead of three. Like 0644 which indicates someone doesn't have any permission, there is a read and write number, and two read permissions. 7777 means that everyone regardless of who is accessing the system has access to read, write, and execute.
Finally, what's the difference between reading, writing, and executing? And why do I sometimes see RWSRWSRT in Win SCP?
Asked
Active
Viewed 3,152 times
0
rwsrwsrwt
when using filesystems that do not support Unix-style permissions at all (such as FAT or NTFS). – steeldriver Jan 14 '18 at 13:32chmod 7777
to a file. This gives-rwsrwsrwt
(on ext4). But I don't know if anybody can immediately tell the impact of this. ;-) – PerlDuck Jan 14 '18 at 14:04s
andt
(andS
andT
) characters mean. I just think that most people cannot tell without reading the docs. ;-) They are simply used too rarely to be familiar with them. Except for g+s for directories, I guess, which is more common. – PerlDuck Jan 14 '18 at 14:19