Under various operating systems of Unix and Linux, each file (the folder is also treated as a file) is set to read, write, and run.
For example, when I use the ls -l command to list the file table, I get the following output:
-rw-r--r-- 1 bu users 2254 2006-05-20 13:47 tt.htm
Rw from the second character - means that the user bu has read and write rights, no right to run, and then r-- means that the user group users only have read permission, no right to run, and the last r-- refers to other people (others) Only read permission, no write and run rights. This is the system default setting, I can rewrite tt.htm, the same group of people and others have the right to read, no one has the right to run, because it is just an html file, do not have to run. This is very advanced before Novell's directory services.
The three permissions for reading, writing, and running can be represented by numbers, that is, r=4, w=2, and x=1. Therefore, rw-r--r-- in the above example is represented by 644.
Conversely, 777 is rwxrwxrwx, which means that the logged in user (can be viewed with the command id), his group and others have the highest privilege.
Say one more sentence. I use the chmod o-r tt.htm command to change the permissions, o-r is the permissions of others minus the read. The results are
-rw-r----- 1 bu users 2254 2006-05-20 13:47 tt.htm
If you use the command chmod 777 tt.htm, the result is
-rwxrwxrwx 1 bu users 2254 2006-05-20 13:47 tt.htm
Anyone has three permissions to read, write, and run.
What does chmod permissions 777 mean (under various operating systems of UNIX and Linux)