If you have a link to a file rather than the actual file how

If you have a link to a file rather than the actual file, how do you change the permissions of the link itself rather than the actual file (look up the man page for chimed)? Which chimed flag allows you to recursively change the permissions of files inside of a directory, rather that the file/directory itself?

Solution

1. chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. The permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. chmod ignores symbolic links encountered during recursive directory traversals.

-h If the file is a symbolic link, we need to change the mode of the link rather than the file that the link points to

Also, we can reccursilvely use chmod command to change the link permissons whcih wil be applied to main directory. eg chmod 777 directory/*, this command will effect the link also.

2. -R is the flag whcih is used to recursively change the permissions of files inside of a directory

eg chmod -R 777 directory

 If you have a link to a file rather than the actual file, how do you change the permissions of the link itself rather than the actual file (look up the man pag

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site