Subject: Re: Symlink ownership
To: Captech) <greywolf@tomcat.VAS.viewlogic.com (James Graham>
From: Greg A. Woods <woods@kuma.web.net>
List: current-users
Date: 08/01/1995 12:16:11
[ On Mon, July 31, 1995 at 13:00:13 (PDT), James Graham wrote: ]
> Subject: Re:  Symlink ownership
>
> 	* chown() as far as I could tell never affected the symlink
> 	  itself, although if, as you say, ownership were to be significant,
> 	  we'd need lchown().

On SunOS-4.1.x it definitely does:

ttyp1:<woods@most> # ls -lg rmt ../etc/rmt
-r-xr-xr-x  1 root     staff       16384 Oct 13  1990 ../etc/rmt
lrwxrwxrwx  1 root     staff          10 Aug  1 10:42 rmt -> ../etc/rmt
ttyp1:<woods@most> # chown woods rmt
ttyp1:<woods@most> # ls -lg rmt /usr/etc/rmt
-r-xr-xr-x  1 root     staff       16384 Oct 13  1990 ../etc/rmt
lrwxrwxrwx  1 woods    staff          10 Aug  1 10:42 rmt -> ../etc/rmt
ttyp1:<woods@most> # chown root rmt
ttyp1:<woods@most> # ls -lg rmt ../etc/rmt
-r-xr-xr-x  1 root     staff       16384 Oct 13  1990 ../etc/rmt
lrwxrwxrwx  1 root     staff          10 Aug  1 10:42 rmt -> ../etc/rmt

On the other hand, chmod() affects the target, not the link, and there
is no lchmod() [documented or in libc].

-- 
							Greg A. Woods

+1 416 443-1734			VE3TCP			robohack!woods
Planix, Inc. <woods@planix.com>; Secrets Of The Weird <woods@weird.com>