- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How do you change permissions on a logical link?
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
Forums
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
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
тАО07-02-2004 01:34 AM
тАО07-02-2004 01:34 AM
#pwd
/var/spool/lp
# ln -s /var/adm/lp/log log
Would like /var/spool/lp/log to has a sticky bit.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2004 01:40 AM
тАО07-02-2004 01:40 AM
Re: How do you change permissions on a logical link?
I've noticed in the past thad chmod -R doesnt change soft links.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2004 01:40 AM
тАО07-02-2004 01:40 AM
Re: How do you change permissions on a logical link?
I've noticed in the past thad chmod -R doesnt change soft links.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2004 01:41 AM
тАО07-02-2004 01:41 AM
Re: How do you change permissions on a logical link?
See "man 4 symlink" for more details.
Simon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2004 01:41 AM
тАО07-02-2004 01:41 AM
Re: How do you change permissions on a logical link?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2004 01:51 AM
тАО07-02-2004 01:51 AM
Solutionas SEP said you should change the main file in order to have other permissions on link.
Anyway I see that both files are on the same filesystem (/var).
Then you can create an hard link, no soft link:
#pwd
/var/spool/lp
# ln /var/adm/lp/log log
Then you can change permissions on link too.
In order to set sticky bit:
#pwd
/var/spool/lp
# chmod 1555 log
# ll log
-r-xr-xr-t 2 root sys 15096 Mar 2 10:35 log
Does it help you?
Best regards,
Fabio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2004 02:02 AM
тАО07-02-2004 02:02 AM
Re: How do you change permissions on a logical link?
Compile/link it like this:
cc lchmod.c -o lchmod
Execute it like this:
lchmod 1755 symlink1 [symlink2 ...]
NOTE: This puppy only understands octal modes. It is left as a student exercise to make it understamd symbolic (e.g. rwx) modes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2004 02:09 AM
тАО07-02-2004 02:09 AM
Re: How do you change permissions on a logical link?
I just compiled and tested you program, lchmod 000'd a symlink, and I could still view it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2004 02:13 AM
тАО07-02-2004 02:13 AM
Re: How do you change permissions on a logical link?
You can also use lchmod call as told by AC.
Or you can just remove the link, set up the umask as you want and re-create the link.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2004 04:11 AM
тАО07-02-2004 04:11 AM
Re: How do you change permissions on a logical link?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2004 07:27 AM
тАО07-02-2004 07:27 AM
Re: How do you change permissions on a logical link?
I use the following to follow the link to get the "real" permissions, even of linked files..
ls -lL
Regards
Tim