piatok 14. januára 2022

chmod and verbose

 chmod -v is verbose for chmod.


Administrator must be paranoid to myself. You know the stories: "ups, rm -rf /usr ; reboot 12 nodes cluster ; god dammit! I removed root user; etc.


Linux permissions could be dangerous. For our helping we use options -v. -v is in unix verbose. Let me show how it works in practice!




1) check the permissions 


ll is alias on ls -l 


[root@localhost ~]# ll linux.txt

-rw-r--r--. 1 root root 6 Jan 14 03:42 linux.txt

[root@localhost ~]#


2) set permissions to 600


chmod 600 linux.txt


3)  you see the -v 


[root@localhost ~]# chmod -v 600 linux.txt

mode of ‘linux.txt’ changed from 0644 (rw-r--r--) to 0600 (rw-------)

[root@localhost ~]#


next article about chmod: https://zapiskylinuxadmina.blogspot.com/2022/01/chmod-x-usrbinchmod.html

Žiadne komentáre:

Zverejnenie komentára