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

this may be a reminder from the old, broken days or just stolen fron
a broken system...

> Personally I think that it should resolve the symlink. Access and
> ownership should be controled by the file that the symlink points to.

at least for chown(1) this is a *bad* idea.
small example: you have to change the change the UID of a directory tree
from one user (e.g. moving to an other insitute; other working group etc.).

using

chown -R new_user.new_group ~new_user/.

may have *nasty* "side effects" when the user has a symbolic link like this one:

# ls -l ~new_user/private
total 0
lrwxrwxrwx 1 old_user old_group 11 Jul 11 19:30 ATARI! -> /etc/passwd


Harald
--
All SCSI disks will from now on ___ _____
be required to send an email notice 0--,| /OOOOOOO\
24 hours prior to complete hardware failure! <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig, \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik // / \\ \
koenig@tat.physik.uni-tuebingen.de ^^^^^ ^^^^^


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