본문 바로가기

Programming/Linux Tip

The result of access(ls, cp) according parent directory permission | 상위 디렉토리의 권한에 따른 access(ls, cp) 결과


./SE_API/1111


ls -al ./SE_API/1111

-rwxr-xr-x



parent directory user permission

r(4)

x(1)

(0)

status

drwxr-xr--  2 root root    4096 10월 26 18:15 .

drwxrwxrwx 11 root root    4096 10월 27 13:25 ..

-rwxr-xr-x  1 root root       5 10월 26 18:18 1111

drwxr-x--x  2 root root    4096 10월 26 18:15 .

drwxrwxrwx 11 root root    4096 10월 27 13:09 ..

-rwxr-xr-x  1 root root       5 10월 26 18:18 1111

drwxr-x---  2 root root    4096 10월 26 18:15 .

drwxrwxrwx 11 root root    4096 10월 27 13:09 ..

-rwxr-xr-x  1 root root       5 10월 26 18:18 1111

ls ./SE_API

ls: cannot access ./SE_API/1111: Permission denied

1111

ls: cannot open directory ./SE_API: Permission denied

ls: cannot open directory ./SE_API: Permission denied

ls ./SE_API/*

ls: cannot access ./SE_API/1111: Permission denied

ls: cannot access ./SE_API/*: No such file or directory

ls: cannot access ./SE_API/*: Permission denied

cp ./SE_API/1111 ./

cp: cannot stat ‘./SE_API/1111’: Permission denied

success

cp: cannot stat ‘./SE_API/1111’: Permission denied

ls ./SE_API/1111 -al

ls: cannot access ./SE_API/1111: Permission denied

-rwxr-xr-x 1 root root 5 10월 26 18:18 ./SE_API/1111

ls: cannot access ./SE_API/1111: Permission denied