Messages in this thread |  | | From | (Orlando M. Amador) | Subject | Re: How does chown(2) works with symlinks? | Date | Wed, 10 Jul 1996 06:59:48 -0400 (AST) |
| |
> > In article <m0ud2oF-000h9vC@amador.org>, > Orlando M. Amador <oamador@amador.org> wrote: > :Which file gets changed when a call to chown(2) is done on a symlink? > :The man page gives the impression that it would follow the symlink and > :change the owner of the file pointed by the symlink. Still, if a used > :chown on a symlink now, it will only change the symlink. Was there a > :change to the way it works? > > I don't see anything in the manpage that suggests that. In any event, > there is one place where the ownership of the link itself is significant > (deleting the link from a directory which has it's sticky bit set), so > it makes sense to have a way to change that ownership. It's 'chmod' > that follows the link and affects the target, since the permission bits > on the symbolic link itself are meaningless. > > -- > Bob Nichols rnichols@interaccess.com > >
The fact that chmod(2) could return an 'ELOOP' error (According to manpages 1.8) suggest that chmod() used to follow the symlink. This not the case anymore.
Personally I think that it should resolve the symlink. Access and ownership should be controled by the file that the symlink points to.
Saludos, Orlando
-- Orlando M. Amador oamador@amador.org Avenida Country Club #1027 (787) 898-5181 Camuy, PR 00627 Fax: (787) 898-6686
|  |