- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to create symbolic link permission of lr--...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2003 06:48 AM
тАО09-11-2003 06:48 AM
Re: How to create symbolic link permission of lr--r--r-T
jack...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2003 06:53 AM
тАО09-11-2003 06:53 AM
Re: How to create symbolic link permission of lr--r--r-T
Sorry, didn't mean to imply anybody was really being ignored, it's just my perculiar type of English I guess :)
Still, I really would be surprised if these permissions can be achieved on the link without a little bit of C and some inode mangling magic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2003 06:54 AM
тАО09-11-2003 06:54 AM
Solution# rm /etc/termcap
# tlinstall
NOTE: tlinstall is searching filesystem - please be patient
NOTE: Successfully completed
# ll /etc/termcap
lr--r--r-T 1 root sys 22 Sep 11 15:46 /etc/termcap -> /usr/share/lib/termcap
See man tlinstall for more info.
A "tusc" of the tlinstall command reveals it uses the lchmod() system call to set the mode:
lchmod("/etc/termcap", 0101444) ............................... = 0
This system call is undocumented (ie no man page), but its easy to write a C program that can use it.
Regards,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2003 06:55 AM
тАО09-11-2003 06:55 AM
Re: How to create symbolic link permission of lr--r--r-T
The permission "T" (sticky bit set without "execute" permission for "others") can be set only with chmod command. Since you cannot set it on symbolic links, the best way is to tar and untar the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2003 06:58 AM
тАО09-11-2003 06:58 AM
Re: How to create symbolic link permission of lr--r--r-T
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2003 07:00 AM
тАО09-11-2003 07:00 AM
Re: How to create symbolic link permission of lr--r--r-T
I dont believe you can do it. Certainly not easily anyway. Umask wont allow it, chmod wont allow it (binary or C call). Ive tried all sorts of C calls to create, modify, open, write files and none will do it. C ignores the symlink also - goes straight to its destination.
I think youre going to have to bite the bullet and do it the hard way and tar it over from another server.
Now, if I had assembler for HP-UX and I could recall how to do it I think it would be possible!
It would certainly be interesting though to find out how HP created it in the first place.
/etc/termcap is not listed under swlist -l file which means its not on the source, but its created at some point by some program. Any ideas anyone which program it is ? I think it must exist on a server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2003 07:09 AM
тАО09-11-2003 07:09 AM
Re: How to create symbolic link permission of lr--r--r-T
The /etc/termcap link to /usr/share/lib/termcap is a 9.X to 10.X transition link.
If you execute the command:
# /opt/upgrade/bin/tllist
It will show a list of all transition links that have been installed on your system. You will notice that /etc/termcap is one of those.
If you really want to re-establish the link the way it should be you can probably use the tlinstall command.
To preview what tlinstall will do:
# /opt/upgrade/bin/tlinstall -p -v
To actually have tlinstall recreate the transition link (I believe it will only recreate what is not there):
# /opt/upgrade/bin/tlinstall -v -l
Note: As far as I know this is the ONLY way to (re)create /etc/termcap with the permissions that it should have. It can not be done with the regular chmod command. /etc/termcap is a special case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2003 07:14 AM
тАО09-11-2003 07:14 AM
Re: How to create symbolic link permission of lr--r--r-T
Thanks to all for your help. Ran tlinstall and the link got recreated.
Nothing like a challenge to keep the minds going. :)
Jack...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2003 07:47 AM
тАО09-11-2003 07:47 AM
Re: How to create symbolic link permission of lr--r--r-T
The attached code illutrates its use. I intentionally did this in K&R C so that even the bundled C compiler can handle it. Compile like this:
cc lchmod.c -o lchmod
Use it like this on an EXISTING symbolic link.
lchmod 1664 mysymlink1
NOTE: This guy only understands OCTAL permissions but you are free to make it smarter if you like.
Regards,
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2003 11:44 AM
тАО09-11-2003 11:44 AM
Re: How to create symbolic link permission of lr--r--r-T
I have been following this thread all day because it was so interesting and challenging. After reading Stefan's comments and repeating some of his attempts in C, I too was completely baffled. Then I saw our Clay's last answer and was amazed. I tried it and it worked! So Clay, how did you know about this secret and undocumented lchmod function? You must be using some inside HP connections to come up with that answer.
PS Jack, you need to give Clay 50 points for that answer because he really solved a mystery.
I love this place,
Greg