Permission For A directory
Execute permission of a directory means whether you can enter in it or not.
But if you have the read permission only you can still see its content through
ls.
But If you
have read (or read+write) permission only you can only ls it but cannot see the
long listing of the content, Even if the content have full permission. More
over you cannot see/cat any content even if the content has full permission.
You cannot edit a content as well. You cannot delete an existing content or
create a new file even if the parent folder has read+write but no execution
permission.
“cat
/perm/a.txt” means
you have to enter into the directory then cat
a.txt, as a result without execution permission on perm it will show
permission denied for cat /perm/a.txt
while:
drwxr-xrw-
2 root root 4096 Jan 3 02:25 /perm
-rw-r--rwx
1 root root 109 Jan 3
02:25 /perm/a.txt
NOTE: Enter does not mean double click in GUI and
see the content graphically, Its actually read. Still you cannot
create/delete/edit/cat any content which you are seeing in the GUI if the
parent folder/directory has no execution permission.
Read
permission of a directory means whether you can ls it or not. Without read
permission the tab will not work as well. But if you cat writing the specific
file path correctly with W+X on the parent folder you can do whatever you want
as the permission of the file itself.
NOTE: Double click will be disabled or show empty
without read permission, so graphically you can do nothing without read
permission on the parent. So double clicking and show the content==ls but not
exactly entering into it.
Write
permission of a Directory means whether you can delete an existing content and
create a new content or not.
NOTE: Write permission on the parent folder does
not prevent the write permission of a specific content. Which means Still you
can edit your files without write permission on the parent folder as long as
you have the execution permission on the parent and write permission on the
file/content.
Thank you
Asraful
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন