I've read rm: cannot remove directory/: Permission denied, noted answers to the question where permissions for directory were not provided missed restricted directory bit
case, so I decided to learn deeper and stumbled upon the following for which I was not able to find answer by web search:
touch /media/drive/1/2
touch: cannot touch '/media/drive/1/2': Permission denied
ls /media/drive/1
ls: cannot access '/media/drive/1/1': Permission denied
sudo ls -la /media/drive/1
total 0
drw-rw-rw- 2 alex alex 60 Oct 5 08:36 .
drwxrwxrwx 4 root root 80 Oct 5 08:36 ..
-rw-rw-r-- 1 alex alex 0 Oct 5 08:36 1
BTW: why total 0
?
Info page (info '(coreutils) File permissions'
):
- permission to read the file. For directories, this means
permission to list the contents of the directory.
- permission to write to (change) the file. For directories, this
means permission to create and remove files in the directory.
- permission to execute the file (run it as a program). For
directories, this means permission to access files in the
directory.
Internet search basically tells the same.
Folder 1
has both read and write, why operations fail? For x
permission to access
what access
means here?