Automount file permissions
Posted: Sun Jan 01, 2017 1:53 pm
I have found myself in a situation where I am not permitted to read automounted filesystems and I can't fathom why. I recently changed the uid and gid of my user account (username=cefn) from 1001:1001 to 1000:1000 which might be related, but since then I have also run the following to change all files which were previously owned by 1001 to be swapped to 1000...
For example in PCManFM there is a partition mounted from an SD Card named 'fat32', but clicking on it triggers a dialog or if I try to ls it...
But the filesystems seem to have the right sort of visibility if I run with sudo...
Any thoughts how I can get back to a normal situation where I can read automounted filesystems again? Where is the failure happening?
Code: Select all
sudo find / -user 1001 -exec chown -h cefn {} \;
sudo find / -group 1001 -exec chgrp -h cefn {} \;
Code: Select all
The specified directory '/media/cefn/fat32' is not valid
Code: Select all
ls -la /media/cefn/fat32/
ls: cannot access '/media/cefn/fat32/': Permission denied
cefn@cefn-xenial-toshiba:~$ ls -la /media/cefn/fat32/Sky
ls: cannot access '/media/cefn/fat32/Sky': Permission denied
Code: Select all
sudo ls -la /media/cefn/
total 24
drwxr-x---+ 5 root root 4096 Jan 1 13:29 .
drwxr-xr-x 4 root root 4096 Jan 1 11:58 ..
drwxr-xr-x 9 root root 4096 Dec 31 17:28 96e93dc8-b388-482e-bab1-1ac4a7ce35e4
drwxr-xr-x 4 cefn cefn 8192 Jan 1 1970 fat32
drwxr-xr-x 3 root root 4096 Dec 30 00:35 lubuntu-root