System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Why do symlinks have 777 permission ?

 
Nishank
Occasional Visitor

Why do symlinks have 777 permission ?

Hi folks

Just trying to figure out why symbolic links have a 777 permission by default. I know there bits are inconsequential because it is the file it is pointing to that is seen for read/write/execute access. But still it could have been that the symlinks had the same value as the file all the time, or they had some other value, like a read (444). Why 777 ?

Is it to do with the fact that the symlinks can belong to different file systems as the file they point to, or because they have a seperate inode number to that of the file ?

Urgent help required.

Thanks
1 REPLY
Suraj K Sankari
Honored Contributor

Re: Why do symlinks have 777 permission ?

Hi,

See the below link or read this
http://www.linuxquestions.org/questions/linux-general-1/why-chmod-cannot-change-symbolic-link-permission-102012/

Permissions on symlinks would simply make no sense at all, only the permissions of the file that they point to is relevant, and that's what linux changes when you chmod a symbolic link.

There's no point and no logic behind modifying the permissions of a symlink from a conceptual point of view (even if that was possible, which it is not). If accessing to a file was as easy as creating a symlink to it and then changing the permissions of the symlink the linux would be the most insecure os around the world.

It would be like drawing a door in a wall with a pencil and pretending to open it when you don't have the key to the front door

Suraj