LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-13-2016, 02:52 PM   #1
JockVSJock
Senior Member
 
Registered: Jan 2004
Posts: 1,420
Blog Entries: 4

Rep: Reputation: 164Reputation: 164
Question What permissions take precedence when dealing with softlinks?


This is on RHEL5.

I've changed permissions on /bin/traceroute from 0755 to 0700, however when running ls

Code:
[root@server bin]# stat traceroute
  File: `traceroute'
  Size: 41248           Blocks: 96         IO Block: 4096   regular file
Device: fd00h/64768d    Inode: 196616      Links: 1
Access: (0700/-rwx------)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-04-09 02:24:58.000000000 -0500
Modify: 2011-03-28 14:29:47.000000000 -0500
Change: 2016-04-13 14:47:51.000000000 -0500

[root@server bin]# ls -al | grep -i traceroute
lrwxrwxrwx  1 root root      10 Aug 25  2015 tcptraceroute -> traceroute
-rwx------  1 root root   41248 Mar 28  2011 traceroute
lrwxrwxrwx  1 root root      10 Aug 25  2015 traceroute6 -> traceroute
lrwxrwxrwx  1 root root      10 Aug 25  2015 tracert -> traceroute
There are three softlinks that point to /bin/traceroute and all of them are 777, so does the softlink permissions override /bin/traceroute or will this be a non-issue?

thanks
 
Old 04-13-2016, 03:49 PM   #2
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
This is a non-issue. The permissions for /bin/traceroute take precedence.
 
Old 04-13-2016, 03:51 PM   #3
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
Actually, here is a full-on demonstration that it is a non-issue:


Code:
jka@bonzai:~$ sudo bash
[root@bonzai jka]# cd /var/tmp/
[root@bonzai tmp]# ls
[root@bonzai tmp]# touch a
[root@bonzai tmp]# ls -l a
-rw-r--r-- 1 root root 0 Apr 13 17:01 a
[root@bonzai tmp]# chmod 600 a
[root@bonzai tmp]# ln -s a b
[root@bonzai tmp]# ls -l
total 0
-rw------- 1 root root 0 Apr 13 17:01 a
lrwxrwxrwx 1 root root 1 Apr 13 17:02 b -> a
[root@bonzai tmp]# exit
jka@bonzai:~$ cd /var/tmp/
jka@bonzai:/var/tmp$ touch b
touch: cannot touch `b': Permission denied
jka@bonzai:/var/tmp$ touch a
touch: cannot touch `a': Permission denied
 
  


Reply

Tags
permissions, softlink



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
Does a Samba ACL take precedence over standard Unix permissions? StupidNewbie Linux - Security 1 04-11-2010 01:00 AM
LXer: Dealing With "Permissions on the password database may be too restrictive" Erro LXer Syndicated Linux News 0 06-11-2009 07:41 PM
When to use hard or softlinks JosephS Linux - Software 6 06-18-2008 11:02 PM
All sorts of problems.... dealing with permissions secondvijai007 Linux - Software 6 04-06-2006 11:29 PM
Proftpd + softlinks + no go? BlackRabbit Linux - Software 6 12-16-2003 08:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:15 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