Operating System - HP-UX
1819931 Members
3159 Online
109607 Solutions
New Discussion юеВ

How to set sticky bit for a soft link?

 
Stephen Ratzlaff
New Member

How to set sticky bit for a soft link?

How do you set the sticky bit for a soft link?

I've looked at man for chmod, umask, etc. and basically umask says it can't be done.

I'd like to create soft link with sticky bit set for:

/etc/install -> /usr/sbin/install

but can't do it.

Any ideas?
3 REPLIES 3
Stephen Ratzlaff
New Member

Re: How to set sticky bit for a soft link?

Whoops, I should mention that I'm attempting to do this because the database on one server I'm using didn't clean itself up and left another install file in /etc.

Now whenever I install a package on that server the tlinstall_clean fails becasue the /etc/install file exists. Other servers which do work properly have a softlink with the sticky bit set for /etc/install pointing to /usr/sbin/install and I'm trying to duplicate what works.
Sridhar Bhaskarla
Honored Contributor

Re: How to set sticky bit for a soft link?

Hi,

You cannot create it by using chmod or umask. These are transitional links and even not having a sticky bit does not matter.

If you insist on doing it, you can use the command "/opt/upgrade/bin/tlinstall" to restore the transitional links. Look at the man page of "tlinstall" for more information.

tllist is another useful command.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
doug hosking
Esteemed Contributor

Re: How to set sticky bit for a soft link?

The sticky bit on symbolic links has no effect on the way the link works. In fact, permissions on the actual link aren't used at all for access checks. The sticky bit on symbolic links simply means that the link is a 'transition link' - a link that exists solely for backward compatibility reasons.
tlinstall and tlremove are really the only
applications that care about this bit on
links. Because transition links were intended to be temporary and only used by these two programs, the API for altering the sticky bit isn't officially documented. Use of tlinstall and/or tlremove (/opt/upgrade/bin) is the supported way to alter them.