Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-09-2006, 02:55 PM   #1
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, 03:37 PM   #2
Senior Member
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

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

Rep: Reputation: 168Reputation: 168
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):
       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.


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 03:06 AM
cp and symbolic links? sausagejohnson Linux - General 3 07-19-2005 01:25 AM
Symbolic Links petercool Linux - General 2 08-20-2003 11:15 AM
symbolic links winger Linux - General 5 04-06-2002 05:16 PM
symbolic links NoahsMyBro Linux - Newbie 1 11-16-2001 11:13 AM > Forums > Linux Forums > Linux - Newbie

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

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