Rick Green
From your explanation, it would appear that in the case of a hard link, the ownership/permissions of whatever name was referenced would be the only one controlling the access, since the other directory entry wouldn't even get read. Am I right so far?
Keep in mind that access is not granted according to the file's permissions (stored in the inode) only. Permissions of all directories in the file's full path are taken into account too. (So the answer to your question is no.)
But in the case of 'soft' or symbolic links, the link is a reference to the primary file name, so both directory entries get read when a reference is attempted thru the link. Which directory entry's ownership/permissions will control the access?
The target permissions are important, permissions of symbolic links are not used!
My specific question dealt with symbolic links to device files, specifically /dev/cdrom -> /dev/scd0 and /dev/cdrecorder -> /dev/scd1.
Use the -L option of "ls" to dereference symbolic links: $ ls -l /dev/cdrecorder lrwxrwxrwx 1 root root 4 Jun 30 21:47 /dev/cdrecorder -> scd0 $ ls -lL /dev/cdrecorder brw------- 1 malusek malusek 11, 0 Sep 24 03:54 /dev/cdrecorder
Also links to executables with suid/sgid bits set.
The situation is the same as for other permissions. -- Alexandr.Malusek@imv.liu.se