LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 01-20-2008, 05:56 AM   #1
zeynep
Member
 
Registered: Jan 2008
Posts: 34
Blog Entries: 1

Rep: Reputation: 15
permissions


hello,
how i can list
under the
/bin directory folders and users who have permissions of read
 
Old 01-20-2008, 06:13 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
"ls -l" gives you the complete information on files and folders (directories). Permissions are arranged in three categories: Owner, Group, and others. If the third group has an "r" then everyone has read permission.

For the group category, you also need to know who is in the group. For that, look at /etc/group. Suppose the groupname for the file or directory is "bozos": enter "cat /etc/group|grep bozos"
 
Old 01-20-2008, 07:32 AM   #3
zeynep
Member
 
Registered: Jan 2008
Posts: 34

Original Poster
Blog Entries: 1

Rep: Reputation: 15
I first made
ls -al
i saw the whole list but a lof of folder exist who have permissions of read after grep should i write one by one folder names?
 
Old 01-20-2008, 09:12 AM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
ls -alR will show you a recursive list (shows directories and sub-directories).
 
Old 01-20-2008, 11:19 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by zeynep View Post
I first made
ls -al
i saw the whole list but a lof of folder exist who have permissions of read after grep should i write one by one folder names?
I don't understand this question. When I suggested using grep to look at the "group" file, the entry after grep was a group name.

Here's a sample of what ls -l produces:
drwxr-xr-x 5 root bin 4096 Aug 31 10:48 cisco-vpnclient/

Translation (partial):
cisco-vpnclient is a directory owned by "root" and assigned to the "bin" group. Permissions are:
owner: full
group: read and execute
others: read and execute

To see who is in the "bin" group, do "cat /etc/group|grep bin"
 
Old 01-20-2008, 12:23 PM   #6
zeynep
Member
 
Registered: Jan 2008
Posts: 34

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Thank you now become very clear
after
cat /etc/group |grep bin
some folders listed but still i dont know how i will list read permissions of (not owners or groups) others
 
Old 01-20-2008, 01:13 PM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
The 3rd group in the permissions ("others") means everyone who is not the owner or a group member. You won't find anything on "others" except what shows in the ls -l output.

Look again at the example I posted: the owner (root) has full permissions (rwx), and the group (bin) has read and execute permission (r-x). Everyone else (others) has read and execute permission. "Everyone else" does not need further definition.
 
  


Reply



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
Permissions rust8y Solaris / OpenSolaris 6 07-07-2006 06:34 AM
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 12:00 PM
permission ... permissions .... permissions alaios Linux - General 1 05-31-2005 04:16 AM
getting a directory's permissions and creating a new one with the same permissions newbie1000101 Programming 1 04-10-2004 12:52 PM
Permissions jeopardyracing Linux - Newbie 2 09-29-2003 04:11 PM

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

All times are GMT -5. The time now is 12:18 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
Open Source Consulting | Domain Registration