mount - Not root user does not have access on Mounted SSD - Ask Ubuntu
i have ubuntu 16.04 on laptop. administrator/root user "lex".
recently installed sync, program created user "rslsync". have mounted ssd on startup , want sync couple of folder mounted disk, user "rslsync" not have access , hence program sync too.
here fstab (comments removed):
lex@lex-n501jw:~$ sudo cat /etc/fstab uuid=908d89c2-81bc-4b19-8d70-6300cd1e3334 / ext4 errors=remount-ro 0 1 uuid=a063-fdd7 /boot/efi vfat umask=0077 0 1 uuid=f2b4f98d-8978-4c1a-9d38-202194e0a93c /media/lex/mystorage ext4 defaults 0 2
as can see ssd mounted on startup on /media/lex/mystorage.
some information permissions:
lex@lex-n501jw:~$ sudo ls -la /media/ total 12 drwxr-xr-x 3 root root 4096 Апр 24 2016 . drwxr-xr-x 26 root root 4096 Окт 22 11:41 .. drwxrwxr-x+ 3 lex lex 4096 Сен 25 11:36 lex lex@lex-n501jw:~$ sudo ls -la /media/lex/ total 12 drwxrwxr-x+ 3 lex lex 4096 Сен 25 11:36 . drwxr-xr-x 3 root root 4096 Апр 24 2016 .. drwxrwxr-x 23 lex lex 4096 Окт 25 00:29 mystorage lex@lex-n501jw:~$ sudo ls -la /media/lex/mystorage/ total 100200856 drwxrwxr-x 23 lex lex 4096 Окт 25 00:29 . drwxrwxr-x+ 3 lex lex 4096 Сен 25 11:36 .. drwxrwxr-x 4 lex lex 4096 Окт 23 20:09 bittorrentbox
information "lex" user:
lex@lex-n501jw:~$ id uid=1000(lex) gid=1000(lex) groups=1000(lex),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare),999(docker)
as can see user , group "lex" has access /media/lex/mystorage/ , see disk in nautilus , ok. added "rslsync" user group "lex" not enough.
when switch user "rslsync" , try (the same error sync gui):
lex@lex-n501jw:~$ su rslsync password: rslsync@lex-n501jw:/home/lex$ ls -la /media/ total 12 drwxr-xr-x 3 root root 4096 Апр 24 2016 . drwxr-xr-x 26 root root 4096 Окт 22 11:41 .. drwxrwxr-x+ 3 lex lex 4096 Сен 25 11:36 lex rslsync@lex-n501jw:/home/lex$ ls -la /media/lex/ ls: cannot open directory '/media/lex/': permission denied
information "rslsync" user:
rslsync@lex-n501jw:/home/lex$ id uid=999(rslsync) gid=998(rslsync) groups=998(rslsync),46(plugdev),1000(lex)
after time of researching tried add user "rslsync" group "plugdev" not work can see.
i think there tricky part mounted ssd. have idea how "rslsync" can access /media/lex/mystorage/ ?
as automount disk, default options, fstab
, plugdev
(or other) groups don't enter picture. standard mount. strange though, doesn't mount root:root
.
the permissions on /media/lex
, /media/lex/mystorage
fine, , given other user member of group lex
, should have rwx
access both directories.
i suspect blocking access acl set on /media/lex
. ls -l
output shows +
on /media/lex
. indicates additional permissions have been set, possibly preventing non-owners accessing path. use getfacl /media/lex
see permissions, , setfacl
change them.
if want rid of acl, setfacl -b /media/lex
should job.
Comments
Post a Comment