I have access to a remote Linux machine where every time I create a symbolic link, it is created by default with the following permissions: lrwxrwxrwx
If I try to change the permissions of the symbolic link (i.e. not the path that it points to) using for example:
chmod g-w my_symbolic_link
chmod
runs correctly (no error message is printed) but when I check the permissions again, they are still the same (lrwxrwxrwx
).
I am waiting to hear from the machine administrator, but I was wondering if this is normal behavior, or if it is something specific to the box.
Best Answer
It's normal behavior. What happens can vary depending on the operating system (Solaris at least used to change the link permissions); but since a symlink isn't a normal file, the permissions don't actually get used for anything. (File permissions are part of the file's inode, so the symlink can't affect them.)