1834599 Members
4085 Online
110069 Solutions
New Discussion

changing a hard link

 
Ron Bromwell
Frequent Advisor

changing a hard link

I'm having trouble with a service starting on one of my machines. I've noticed some differences between this machine and my others in the permissions of the hard links. The machine that I'm having trouble with has a bunch of files in /etc with the following permissions on links:
lr--r--r-T

All the other machines have the same links with permissions of:
lrwxrwxrwt

Can the links be changed, or do they have to be removed and re-established?

Thanks,
Ron
life's a journey, not a destination
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: changing a hard link

Hi Ron:

The permissions of a link are meaningless. Further, it appears that this is a soft, transition link. What is the file in question?
Please provide 'ls -ls' output.

Regards!

...JRF...
S.K. Chan
Honored Contributor

Re: changing a hard link

Soft link you mean .. ? Usually you don;t have to mess with the "link" permission, especially if it's in /etc if nothing is broken.
Rich Wright
Trusted Contributor

Re: changing a hard link

Ron,
Permissions of lr--r--r-T indicates a soft link, not a hard link. A hard link will not have the leading 'l'.
Example:
# ln xxx yyy
# ll xxx yyy
-rw-rw-rw- 2 root sys 0 Jul 11 15:19 xxx
-rw-rw-rw- 2 root sys 0 Jul 11 15:19 yyy
### yyy is a hard link and the permissions are valid ###

# rm yyy
# ln -s xxx yyy
# ll xxx yyy
-rw-rw-rw- 1 root sys 0 Jul 11 15:19 xxx
lrwxrwxrwx 1 root sys 3 Jul 11 15:19 yyy -> xxx
### yyy is now a soft link and the permissions are ignored ###
Sridhar Bhaskarla
Honored Contributor

Re: changing a hard link

Just wanted to make sure that you didn't change the permissions of the link using chmod/chown. If you did, look at the linked file to see if the permissions got messed up and compare them with the other systems.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ron Bromwell
Frequent Advisor

Re: changing a hard link

Sorry about that, it is a soft link. My main concern was the "T". According to the man page on ll, the "T" is the same as "t" except execute permissions are denied to others.
life's a journey, not a destination
Andreas Voss
Honored Contributor

Re: changing a hard link

Hi,

the T means that this is a transition link.
See man tllist

Regards