The difference between chown and chmod

  
                  

chown Modify user and user group properties for files and folders 1. To modify the owner of the file hh.c. Modify this user for sakia all chown sakia hh.c This will apply the user access rights of hh.c to sakia as the owner

2. Change the owner and group of the directory /tmp/sco to sakia and group net chown -R sakia:net /tmp/sco

chmod modify file and folder read and write execution properties 1. Modify the hh.c file to be writable and readable. chmod 777 hh.c To modify all file attributes in a directory to be writable and readable executable chmod 777 *.* Replace folder name and suffix with * That's it. Similarly, if you want to modify the properties of all htm files chmod 777 *.htm 2. Modify the directory /tmp/sco to be writable and readable executable chmod 777 /tmp/sco

To modify all the folder attributes in a directory to be writable and readable executable chmod 777 * put the folder name Use * instead of

To modify all files and folders under /tmp/sco and its subfolder properties to be writable and readable chmod -R 777 /tmp/sco

Writable w=4 Readable r=2 Executable x=1 777 is full authority. Freely combine user and group permissions as needed

Copyright © Windows knowledge All Rights Reserved