[NTLUG:Discuss] Is there a way to change permissions of a link

MadHat madhat at unspecific.com
Wed Nov 1 17:39:07 CST 2000


Neil Aggarwal wrote:
> 
> Steve:
> 
> I have symlinks, and the link has different permissions than
> the file:
> 
> % ls -la
> lrwxrwxrwx 1 neil neil 4 Sep 22 07:22 myLink-> myFile
> -rw-r--r-- 1 neil neil 2276 Sep 1 15:29 myFile
> 
> Can the symlink have different permissions than 777?
> 
>         Neil.

The symlink will always show 777 because it does not technically have
permissions.  The permissions are held in the inode and all the symlink
is is a pointer to another file _name_, not to the inode itself.  The
inode is what contains the permissions, therefore only the file itself
or a hardlink can have "real" permissions...


-- 
MadHat at unspecific.com
                                   "The 3 great virtues of a programmer:
                                      Laziness, Impatience, and Hubris."
                                                 --Larry Wall



More information about the Discuss mailing list