LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-09-2006, 03:55 PM   #1
jcai
Member
 
Registered: Sep 2004
Distribution: Fedora 5
Posts: 48

Rep: Reputation: 15
symbolic links and permissions


is there any way to modify the permissions of the file that a symbolic link points to through the symbolic link? ie: never having to explicity change the permissions on the real file itself?
 
Old 06-09-2006, 04:37 PM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
From the chmod man page:
Quote:
...for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file.
 
Old 06-09-2006, 04:37 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 162Reputation: 162
The default behaviour of chmod is to change the behaviour of the file pointed to by the link if the link is one of the command line arguments to chmod. However, chmod will ignore links found during recursive directory searches. From man chmod (for chmod 5.96 on Slackware):
Code:
       chmod never changes the permissions of symbolic links; the chmod system call cannot change their  per-
       missions.  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 permissions of the  pointed-to  file.
       In contrast, chmod ignores symbolic links encountered during recursive directory traversals.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
symbolic links durden2.0 Linux - Newbie 6 11-12-2008 04:06 AM
cp and symbolic links? sausagejohnson Linux - General 3 07-19-2005 02:25 AM
Symbolic Links petercool Linux - General 2 08-20-2003 12:15 PM
symbolic links winger Linux - General 5 04-06-2002 06:16 PM
symbolic links NoahsMyBro Linux - Newbie 1 11-16-2001 12:13 PM


All times are GMT -5. The time now is 05:17 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration