Re: Permission question
No - the permissions refer to the symbolic link, not to the file pointed
to. See below:
# create a file foo
nujoma:~> touch foo
# restrict it
nujoma:~> chmod og-rwx foo
# create a link
nujoma:~> ln -s foo bar
# check up on them:
nujoma:~> ls -la bar
lrwxrwxrwx 1 aperrin aperrin 3 Sep 16 16:18 bar -> foo
nujoma:~> ls -la foo
-rw------- 1 aperrin aperrin 0 Sep 16 16:18 foo
# attempt to change permissions on the link
nujoma:~> chmod og-rwx bar
# check on success/failure:
nujoma:~> ls -la bar
lrwxrwxrwx 1 aperrin aperrin 3 Sep 16 16:18 bar -> foo
# try to read the link with "global" permissions:
nujoma:~> su -
Password:
nujoma:~# su - nobody
nobody@nujoma:~$ cat ~aperrin/bar
cat: /home/aperrin/bar: Permission denied
Best,
Andy Perrin
----------------------------------------------------------------------
Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
clists@perrin.socsci.unc.edu * andrew_perrin (at) unc.edu
On Mon, 16 Sep 2002, Hal wrote:
> When permissions on a link and a linked to library differ, which
> permissions control usage? For example, can a program running with a
> non-root user utilize libpam when the permissions in /lib are:
>
> lrwxrwxrwx 1 root root 14 Sep 1 09:31 libpam.so.0 ->
> libpam.so.0.72
> -rw-r--r-- 1 root root 29420 Jan 21 2002 libpam.so.0.72
>
> This is the setup from a stock woody install.
>
> Thanks.
>
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
Reply to: