Linux, each file, folder has its own: the user, the user group belong to
The authority is also divided into three paragraphs
Ls-l can be viewed, rwx respectively: Read and write execution
For example: Ls-l get KKK directory: rwr-xr--x KKK KKK
This means that the KKK directory is allowed for the file owner KKK to be read and write, and is not writable for the user group KKK the file belongs to
Can only be performed for other users, not read or write
Now there are guest users, to the KKK directory, is not able to modify the file, if you need to modify
1. Set the KKK directory recursively to another permission of 7 namely: RWX, but this is an unsafe procedure
Chmod-c-R 777 KKK
Change KKK directory, recursion, all files, folder to 777 that is: rwxrwxrwx
2. Change the owner of the KKK to the guest user
sudo chown-r guest/home/kkk
This represents the change Owner-r (recursive) guest (target user)/home/kkk (the path to owner needs to be changed)
So the KKK owner becomes a guest,su to the guest user, logs in to the KKK directory, and can write to the
Similarly, using CHGRP can change the group that the file belongs to
Change Group
With these settings, the user, the user group, the corresponding file permissions can be understood
With common instructions:
1. Groupadd MySQL
2. Mkdir/home/mysql
3. useradd-g mysql-d/home/mysql MySQL
4. Copy mysql-5.0.45-linux-i686-icc-glibc23.tar.gz to/usr/local directory
5. Decompression: Tar zxvf mysql-5.0.45-linux-i686-icc-glibc23.tar.gz
6. Ln-s mysql-5.0.45-linux-i686-icc-glibc23 MySQL
7. Cd/usr/local/mysql
8. chown-r MySQL.
9. chgrp-r MySQL.