Re: [SEMI OFFTOPIC] symbolic links

Jan Kara (jack@atrey.karlin.mff.cuni.cz)
Mon, 26 Oct 1998 22:18:16 +0100


> Does anybody here know if there is a standard that defines
> what should happen when chmod'ing a symlink?
>
> GIVEN:
>
> $ ln -s somefile somelink
>
> $ ls -l somefile somelink
> -rw-r--r-- 1 sleas sys 0 Oct 20 22:21 somefile
> lrwxr-xr-x 1 sleas sys 8 Oct 20 22:21 somelink -> somefile
>
> If I "chmod 600 somelink", should that act upon somefile, or
> should that change the perms on the symlink inode itself?
>
> I ask because I have seen both behaviors on different systems.
>
> While I'm at it, what does Linux do?
>
In Linux this changes mode of pointed inode (symlink inode has rights rwxrwxrwx which
can't be changed anyhow (Ok, not legally)).

Bye, Honza.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/