Answer the question
In order to leave comments, you need to log in
How do folder permissions work in Linux?
I can not understand how the permissions to the folder happen, and specifically the moment with Read and eXecute.
If I leave the rights -wx then I can go into the folder and edit it WHY? I don't have read permissions.
If I leave the rw- rights, then I can’t access the folder and, accordingly, I can’t edit either, although I have read rights.
Answer the question
In order to leave comments, you need to log in
how the permissions to the folder happen, and specifically the moment with Read and eXecute
R to directory - read its contents
W to directory - edit directory (add, delete files, rename files)
X - go to directory
Read documentation
what do you mean you can't edit?
mkdir test
chmod -r test
cd test
pwd
# /home/user/test
touch zzz
mkdir qqq
ls -la
# ls: невозможно открыть каталог '.': Отказано в доступе
rm -r zzz qqq
cd ..
rm -r test
Please note that the directory does not have rwx, but three of them
, and this is how it is live
. Look, there is a user and a group, due to them you switch between groups of rights.
It is obvious that you are in the root group and you have 1 group.
In general, read about rights.
and x is run because a directory is actually a file to be run and there are no directories.
By the way, there are no files either, there are only inodes, good use of Linux;)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question