LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-02-2005, 06:55 PM   #1
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
symlink permisions?


I noticed a lot of my symlinks have permsissions of 777. I noticed when I created my last symlink it gave me permissions of 755. Do I need full permissions on the link?
 
Old 03-03-2005, 12:16 AM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
i'm afraid you must be confused in some way

changing permission on a symbolic link (ln -s) alters the permissions of the target only
the link always reads
lrwxrwxrwx
the link is just a pointer
hard links (ln) on the other hand (an inode having multiple names) are a different story
hard links i think are to be avoided as they can leave permissions to a file via the link
different than what the file is set. and can exist outside the target directory leaving the duplicated inode hard to see and possibly under the controll of others.
 
Old 03-03-2005, 09:52 AM   #3
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Original Poster
Rep: Reputation: 30
I made a link the following way
Code:
ln -s /usr/local/bin/bash /bin/bash
now when I check the permissions of my newly made link
Code:
ls -l /bin/bash
I get this output
Code:
lrwxr-xr-x  1 root  wheel  19 Mar  2 18:38 /bin/bash -> /usr/local/bin/bash
should the link the giving me permisissions of lrwxrwxrwx, because it is not. Should I be chmoding it to lrwxrwxrwx. Isn't the default action ln -s to make a link with full permissions, why is my system not doing that?
 
Old 03-03-2005, 10:06 AM   #4
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
It could be that your ls command is an alias to 'ls -H', which follows the link rather than giving you info on the link itself.

If this is the case you could try '\ls -l /bin/bash'

Another possibility is that you already have a /bin/bash, but i assume you would have gotten a message while attempting to create the link.
 
Old 03-03-2005, 10:51 AM   #5
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Original Poster
Rep: Reputation: 30
I just did a test. I made a file, then gave it permissions of 777. Then I made a link to that file, the permissions of the link were still 755.
 
  


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
permisions charnel Linux - General 3 07-10-2005 03:53 PM
ppp-on permisions? e1000 Slackware 5 02-17-2004 12:22 PM
drive permisions newbie03 Linux - Newbie 3 01-10-2004 07:25 PM
looking up file permisions starwind Linux - Newbie 1 10-15-2003 08:33 PM
Permisions ToeShot Linux - General 2 11-30-2001 01:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration