How to check permissions of a specific directory?

后端 未结 10 461
无人共我
无人共我 2021-01-29 17:32

I know that using ls -l \"directory/directory/filename\" tells me the permissions of a file. How do I do the same on a directory?

I could obviously use

相关标签:
10条回答
  • 2021-01-29 18:10

    ls -lstr

    This shows the normal ls view with permissions and user:group as well

    0 讨论(0)
  • 2021-01-29 18:11

    On OS X you can use:

    ls -lead
    

    The e option shows ACLs. And ACLs are very important to knowing what the exact permissions on your system are.

    0 讨论(0)
  • 2021-01-29 18:19

    This displays files with its permisions

    stat -c '%a - %n' directory/*
    
    0 讨论(0)
  • 2021-01-29 18:21

    To check the permission configuration of a file, use the command:

    ls –l [file_name]
    

    To check the permission configuration of a directory, use the command:

    ls –l [Directory-name]
    
    0 讨论(0)
提交回复
热议问题