LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-30-2007, 11:10 PM   #1
sharathkv25
Member
 
Registered: Jul 2006
Distribution: HP-UX
Posts: 46

Rep: Reputation: 15
chmod on a symbolic link


Code:
tpdev2 # ls -lad /nsms/omfs/app/
dr-xr-xr-x  12 otroot     tproot        8192 Apr 30 20:41 /nsms/omfs/app/

tpdev2 # ln -s /nsms/omfs/app /opt/omfs

lrwxr-x---   1 root       sys             14 Apr 30 21:00 osmf -> /nsms/omfs/app
I want the symbolic link "omfs" to have the same 555 permissions as the /nsms/osmf/app folder.

How do that?

A simple "chmod 555 /opt/omfs" is not changing the permission.

I am on HPUX.

Thanks
 
Old 04-30-2007, 11:23 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Are you finding that otroot or tproot can't access /nsms/omfs/app via the osmf link on HPUX? On Linux, the permissions of the link wouldn't matter because they aren't used. The permissions of the file/directory pointed by the link are used. The following is from the Linux man page for chmod:
Code:
       chmod  never  changes the permissions of symbolic links; the chmod system call cannot change
       their permissions.  This is not a problem since the permissions of symbolic links are  never
       used.  However, for each symbolic link listed on the command line, chmod changes the permis-
       sions of the pointed-to file.  In contrast, chmod ignores symbolic links encountered  during
       recursive directory traversals.
 
Old 05-01-2007, 12:05 AM   #3
reverse
Member
 
Registered: Apr 2007
Distribution: Gentoo
Posts: 337

Rep: Reputation: 30
I believe the HPUX chmod will simply change the modes of the "linked to" file as opposed to the "link file" itself. What version of HPUX are we talking about?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why chmod cannot change symbolic link permission? mikeshn Linux - General 17 03-22-2012 07:08 PM
Not a symbolic link ?? attockonian Linux - Newbie 4 06-30-2006 08:09 PM
What is a Symbolic Link? little_penguin Linux - Software 2 05-14-2005 09:27 AM
Symbolic link? jasone Linux - Newbie 4 05-06-2005 07:55 AM
Fedora/JPilot Symbolic Link and Chmod get reset on boot tonyzoc Linux - Hardware 3 12-13-2004 01:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration