LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-02-2015, 09:48 AM   #1
doctore
LQ Newbie
 
Registered: Apr 2015
Distribution: CentOS 7
Posts: 17

Rep: Reputation: Disabled
Permissions question


Hello,

Just starting with Linux and I have a question about permissions. When I run ls on /bin/bash I get the following permissions output:

-rwxr-xr-x .......

Why are there 4 letters on the owner's permissions, namely the last "r" which I have put in bold? Since there are only 3 types - r, w and x, what's the point of the second "r" ?

Thanks

Last edited by doctore; 04-02-2015 at 09:49 AM.
 
Old 04-02-2015, 09:52 AM   #2
thegwer
Member
 
Registered: Jan 2012
Location: San Antonio. TX
Distribution: CentOS. Ubuntu
Posts: 48

Rep: Reputation: Disabled
That is actually the first permission of the middle set.

rwx | r x | r x
owner | group | other
 
1 members found this post helpful.
Old 04-02-2015, 09:53 AM   #3
doctore
LQ Newbie
 
Registered: Apr 2015
Distribution: CentOS 7
Posts: 17

Original Poster
Rep: Reputation: Disabled
Oh, I see. So the two dashes don't divide the sets. What's their purpose, then? Is it just to indicate that "w" is not given to group and users?

Last edited by doctore; 04-02-2015 at 09:55 AM.
 
Old 04-02-2015, 09:58 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,109

Rep: Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268
there are 3 letters: r, w, x. letter means it is set, - means it is not set.
So rwx the first group is for the owner, read, write and execute enabled
for the second and third group (group and others) r-x read and execute are enabled, write is disabled.

http://www.comptechdoc.org/os/linux/..._ugfilesp.html

Last edited by pan64; 04-02-2015 at 10:00 AM.
 
1 members found this post helpful.
Old 04-02-2015, 09:59 AM   #5
thegwer
Member
 
Registered: Jan 2012
Location: San Antonio. TX
Distribution: CentOS. Ubuntu
Posts: 48

Rep: Reputation: Disabled
correct if the file was just read only by all groups it would be

chmod 444 would look like
r--r--r--

Or if it was the opposite

chmod 777 would look like
rwxrwxrwx
 
1 members found this post helpful.
Old 04-02-2015, 10:00 AM   #6
doctore
LQ Newbie
 
Registered: Apr 2015
Distribution: CentOS 7
Posts: 17

Original Poster
Rep: Reputation: Disabled
Perfect, thanks guys!

Last edited by doctore; 04-02-2015 at 10:04 AM.
 
  


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
[SOLVED] filesystem permissions question - making so user can't change permissions? c0pe Linux - Security 4 07-12-2010 10:06 AM
Question about permissions UnforgotteN Linux - Distributions 6 05-18-2005 09:51 PM
Permissions question sammckee Linux - Newbie 3 09-23-2003 11:55 AM
Permissions question... phil1076 Linux - General 3 09-03-2003 11:50 AM
Permissions Question jkraeger Linux - General 1 02-25-2003 11:54 AM


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