LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 01-15-2024, 10:56 AM   #1
croc-gobbo
LQ Newbie
 
Registered: Jan 2024
Posts: 3

Rep: Reputation: 0
Question Unable to list a directory because it has no read perm? I thought only 'x' matters for directories listing?


all directories in path /test/book/coffee have 'x' bit set for user/group/others. I am user 'gamer' so when I use list command I am 'others' in user-group-others. So why am I unable to list it if 'others' doesn't have read permission?
Here is a screenshot uploaded to imgbb: https://ibb.co/THD7HsT

p.s I didn't bother hiding ip, its my vpn's shared ip
 
Old 01-15-2024, 11:21 AM   #2
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195
Blog Entries: 2

Rep: Reputation: 5
I think that in that those r for read and w for write permissions are important. X is for execute permission I think. You have to set readable for all. I am not an expert but hope this helps. X E.
 
Old 01-15-2024, 12:57 PM   #3
croc-gobbo
LQ Newbie
 
Registered: Jan 2024
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by maybeJosiah View Post
I think that in that those r for read and w for write permissions are important. X is for execute permission I think. You have to set readable for all. I am not an expert but hope this helps. X E.
According to all information I have found execute bit permission matters for listing only. And all the parent directories have to have execute permission for that user group(user, group or others - in my case others). So I am not exactly noob but I have no idea why it is acting this way.
 
Old 01-15-2024, 01:09 PM   #4
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,177

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Quote:
Originally Posted by croc-gobbo View Post
According to all information I have found execute bit permission matters for listing only.
Where did you find that info? It seems you got wrong info as reading needs read permission as you demonstrated.
 
Old 01-15-2024, 01:13 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,763

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
Negative.

The execute permission grants the ability to access file contents and meta-information if its name is known, but not list files inside the directory unless the read permissions is set also. ll is an alias for 'ls -l' which is not allowed without read permissions.
 
1 members found this post helpful.
Old 01-16-2024, 10:58 AM   #6
croc-gobbo
LQ Newbie
 
Registered: Jan 2024
Posts: 3

Original Poster
Rep: Reputation: 0
Okay wow, I must have caught something wrong because I was so sure I read that 'x' was for listing dir contents.. I never assumed I could navigate through filesystem without being able to see its contents. But now I realize that directory is also a file in linux and has its functionality and permissions too... Thanks for clearing that up!
 
Old 01-17-2024, 03:38 AM   #7
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,817

Rep: Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211
On directories
r is for reading contents (list the table of filenames)
x is for accessing contents (access files if you know their filenames)
 
1 members found this post helpful.
  


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
Hi! Thought I knew what I'm doing with linux, now discord is crashing, can't remove because I can't login as root LleoOneiro Linux - Newbie 6 10-11-2023 01:45 AM
How can I have: Root has Read-Write, user has read only for the boot filesystem? xmrkite Linux - Software 6 10-16-2008 04:31 AM
Apache Directory Listing Of NFS Mount, cannot view directory list via apache luqmana Linux - Networking 2 12-19-2005 06:03 AM
Display wide listing of files and directories only? northfield Linux - General 3 08-21-2002 06:28 PM
find / \( -perm -0200 -o -perm -04000 \) -ls. How to remove the bit ForumKid Linux - Security 3 01-16-2002 11:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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