简体   繁体   中英

Linux Directory Access Permission

Two directories have the same permissions like this

drwxrw-rw- 2 user_1 users 4096 May 10 23:03 lg-x1

drwxrw-rw- 2 user_1 users 4096 May 11 17:22 lg-c2

when access lg-x1 with user_1, it shows: '-hash cd: lg-x1: Permission denied' ; but lg-c2 is accessable. Both lg-x1 and lg-c2 are accessable when login with root.

what's the difference?

In order to access a directory in Linux you need execute permissions. Only root has it, therefore other users cannot access it. Add x with the relevant sudo chmod you need

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM