I am trying to change the permissions for the symbolic link.
As how you can see in the image, the soft link has 777 permissions, but i would like to change that.
I tried to change that by:
chmod 755 someLink
– but this changes linked directory (someDir) permission.chmod -h 755 someLink
– this brings eroorchmod: invalid option --'h'
Is there a way how to change symbolic link permissions? I am on Ubuntu 18.04
Many thanks in advance
Best Answer
While not an exact duplicate, this answer should provide a hint:
In short: symlinks does not have permissions. Anyone can read where the symlink points to. The permissions of the target determines the access.
As Rinzwind points out, the
-h
flag is for *BSD versions ofchmod
. It does not work on GNU versions ofchmod
.