lkml.org 
[lkml]   [1996]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: How does chown(2) works with symlinks?
Date
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


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:1.789 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site