I used to learn a little bit about Linux in the past, and now I know it only on some small white commands. Think I just do not do server-side development should not touch it, work to know how much to do the development or familiar with some Linux, at least your project will be deployed on the Linux server it. What I didn't understand before is still going to take time to return . No more nonsense ~
Small white like me in the Linux system to view the file directory is generally used LS, in fact, we can use LL (ouch) or ls-l to see more information. For example, show the following:
The leftmost section shows the permissions for the operation of the file or folder, where:
First there are three kinds of permissions here, R is readable (read), W indicates write (write), X is executable (I guess not execute);-Indicates that the corresponding permission has not been granted
The first bit represents the type, the file is-and the folder is D
The next three bits represent the permissions of the file owner, such as rw-on the first line, three for the group, and the last three for other people (other).
The second line, and so on, simply represents the permissions of a folder
Sometimes working with colleagues, others are required to manipulate the files in your directory for convenience. We need to modify the permissions of some files.
You can modify the permissions of a file by using the chmod command at the terminal such as:
chmod A +w b.txt
Represents the Add Write permission (W) to everyone on the B.txt file, where a means that everyone all,+ to add permissions. In addition, the parameter a can be changed to O or G, representing others (other) and groups (group), respectively.
If we want to take back this permission, use the-number.
chmod A-w b.txt
What if we want to bulk modify the permissions of the file under the folder? Folders can be recursively operated-R
chmod -r +W code
In addition, since the privilege is a three-bit three-bit representation, it can be converted to three bits per 8 decimal notation. -Indicates that this bit is 0
You can use the following to assign permissions:
chmod -R 777 Code
777 means rwxrwxrwx, which gives everyone permission to read and write and execute.
Linux File and folder permissions