C
C
centrin02014-04-17 14:51:25
linux
centrin0, 2014-04-17 14:51:25

How are file permissions related to symbolic link permissions?

Created a symbolic link ln -s with full path as root.
There are two more users on the server.
How to make it so that someone who has only a link, and not the files themselves, could not change these same files?
How are file permissions related to symbolic link permissions?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
jcmvbkbc, 2014-04-17
@centrin0

How to make it so that someone who has only a link, and not the files themselves, could not change these same files?

This is always the case: i.e. access to a file is only determined by the owner/permissions of that file. The owner/permissions of the link don't matter.
No way. On Linux, link permissions are not used in any way and cannot be changed, see for example man 7 symlink .

M
Maxim Moseychuk, 2014-04-17
@fshp

The link does not have its own rights, the file's rights are used. Set the correct permissions on the file itself.

V
Valentine, 2014-04-17
@vvpoloskin

groupadd rw
usermod -a -G rw user1
chown root:rw filename
chmod 775 filename
newgrp

And do not change the rights to a symbolic link in any way, it is always 777 on it. This is because there is no such thing as "read the link" or "write the link".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question