Last active
July 2, 2018 19:23
-
-
Save bazzilio/0ee08911fdf43e24d7d543e7b7c7b812 to your computer and use it in GitHub Desktop.
test linux permissions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bazz@bazz ~ $ sudo mkdir test | |
bazz@bazz ~ $ sudo chmod 755 test | |
bazz@bazz ~ $ sudo chown root:bazz test | |
bazz@bazz ~ $ ls -ld test | |
drwxr-xr-x 2 root bazz 4096 июл 2 22:06 test | |
bazz@bazz ~ $ mkdir test/subdir | |
mkdir: невозможно создать каталог «test/subdir»: Отказано в доступе | |
bazz@bazz ~ $ touch test/file | |
touch: невозможно выполнить touch для 'test/file': Отказано в доступе | |
bazz@bazz ~ $ sudo mkdir test/subdir | |
bazz@bazz ~ $ sudo chown root:bazz test/subdir | |
bazz@bazz ~ $ sudo chmod 775 test/subdir/ | |
bazz@bazz ~ $ ls -ld test/subdir/ | |
drwxrwxr-x 3 775 bazz 4096 июл 2 22:09 test/subdir/ | |
bazz@bazz ~ $ sudo chown root:bazz test/subdir/ | |
bazz@bazz ~ $ mkdir test/subdir/subdir2 | |
mkdir: невозможно создать каталог «test/subdir/subdir2»: Файл существует | |
bazz@bazz ~ $ rm -rf test/subdir/subdir2/ | |
bazz@bazz ~ $ mkdir test/subdir/subdir3 | |
bazz@bazz ~ $ touch test/subdir/file | |
bazz@bazz ~ $ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment