[Klug-general] copying a symlink to other users
Mike Evans
mike at tandem.f9.co.uk
Fri Nov 5 12:44:17 UTC 2010
>
> next problem; i'd like to make it so that users cannot modify the
> symlink or delete it. is this possible as symlinks just seem to be 777
> and/or pick up the permissions of the directory they are linked to.
>
To quote wikipedia:
"The file system permissions of a symbolic link usually have relevance
only to rename or removal operations of the link itself, not to the
access modes of the target file which are controlled by the target
file's own permissions."
So set the owner and group of the link itself to root - or some other
owner you set up for the purpose if root is not suitable - and remove
the permissions for anyone other than owner. That will affect the link
itself for removal purposes. For the contents of the linked directory
set the correct permissions on that directory and its files.
Mike
More information about the Kent
mailing list