Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an ubuntu server on rackspace cloud with nginx..The following prints all the file sizes for folders. I want to show all permissions on the same directory.

$ du -sh */
788K    foo/
500K    bar/
931K    baz/


$ du -sh */
wrwx    foo/
0777    bar/

When I try viewing some folders, it says perm denied. I am using normal SSH

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Use a command like ls -ld * | grep "^d"

To see permissions in octal you can use stat -c "%a %n" */

Note that chmod can use symbolic permissions chmod go+rx mydirname

share|improve this answer
    
I get drwxrws--x etc.. How can I see the CHMOD codes instead of that format. –  TheBlackBenzKid Nov 28 '11 at 16:00
    
@TheBlackBenzKid: See updated answer. –  RedGrittyBrick Nov 28 '11 at 16:10
    
Argh, stat on OS X doesn't have %a for their -f (format) flag - any ideas on OS X? –  powerj1984 Jan 3 '13 at 16:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.