unsaid0415@szmer.info to Linux@lemmy.mlEnglish · 2 years agoYou can't cd or ls in a folder if you have no +x permissions on it. That is all. I wasted 3 hours of my life.message-squaremessage-square131fedilinkarrow-up1713arrow-down117
arrow-up1696arrow-down1message-squareYou can't cd or ls in a folder if you have no +x permissions on it. That is all. I wasted 3 hours of my life.unsaid0415@szmer.info to Linux@lemmy.mlEnglish · 2 years agomessage-square131fedilink
minus-squarelloram239@feddit.delinkfedilinkarrow-up41arrow-down1·2 years agols reaction to this is unexpected: $ mkdir foo $ echo Foo > foo/file $ chmod a-x foo $ ls -l foo ls: cannot access 'foo/file': Permission denied total 0 -????????? ? ? ? ? ? file I expected to just get a “Permission denied”, but listing the content it can still do. So x is for following the name to the inode and r for listing directory content (i.e. just names)?
minus-squareZoidberg@lemm.eelinkfedilinkarrow-up2·2 years agoYou can still read the contents of the directory because you have -r on it. If you just run ls foo you’ll see your file on there, no problem. However, without -x you cannot read metadata in that directory. That’s why all information about the file shows as question marks.
lsreaction to this is unexpected:$ mkdir foo $ echo Foo > foo/file $ chmod a-x foo $ ls -l foo ls: cannot access 'foo/file': Permission denied total 0 -????????? ? ? ? ? ? fileI expected to just get a “Permission denied”, but listing the content it can still do. So
xis for following the name to the inode andrfor listing directory content (i.e. just names)?You can still read the contents of the directory because you have
-ron it. If you just runls fooyou’ll see your file on there, no problem.However, without
-xyou cannot read metadata in that directory. That’s why all information about the file shows as question marks.