[NTLUG:Discuss] Is there a way to change permissions of a link
MadHat
madhat at unspecific.com
Wed Nov 1 16:46:35 CST 2000
Neil Aggarwal wrote:
>
> Steve:
>
> Thank you for the long disucssion of how symbolic links work.
> It was really very informative.
>
> But my initial questions still remains. Since the link is just
> a file, it has its own set of permissions. Shoudlnt I be able to make
> the symlink readonly but have the file it points to be read/write?
>
> If so, how can I do this?
Reread the explanation...
a sym link is not a file (it does not have permissions), but an entry in
the directory that point to the file... The file is what has the
permissions, not the directory entry. A hard link would have the same
permissions as the origional file because that is stored in the INODE...
# touch file
# ls -l
-rwxr-xr-x 2 root root 0 Nov 1 16:40 file
# ln file this
# ls -l
-rwxr-xr-x 2 root root 0 Nov 1 16:40 file
-rwxr-xr-x 2 root root 0 Nov 1 16:40 this
# chmod 777 this
# ls -l
-rwxrwxrwx 2 root root 0 Nov 1 16:40 file
-rwxrwxrwx 2 root root 0 Nov 1 16:40 this
I hope that came out right... crappy netscape mail client...
--
MadHat at unspecific.com
"The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris."
--Larry Wall
More information about the Discuss
mailing list