Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a user marc in the group marc. There's a media directory with a subdirectory marc that the user can access. There are also two mounted usb disks there.
I have a second user sonarr who is also in the group marc. But this user can't access the directory /media/marc even though all permissions seem to be correct.
Here is the console output:
Code:
sonarr@media-pc:/media$ cd marc
-su: cd: marc: Permission denied
sonarr@media-pc:/media$ id
uid=123(sonarr) gid=1001(sonarr) groups=1001(sonarr),1000(marc)
sonarr@media-pc:/media$ ls -al
total 12
drwxr-xr-x 3 root root 4096 feb 7 19:46 .
drwxr-xr-x 24 root root 4096 jan 31 18:53 ..
drwxrwxrwx+ 4 marc marc 4096 feb 7 19:46 marc
sonarr@media-pc:/media$
How is this possible?
Last edited by marcselman; 02-08-2019 at 02:28 AM.
I have a second user sonarr who is also in the group marc. But this user can't access the directory /media/marc even though all permissions seem to be correct.
How is this possible?
If the filesystems ON the shared media are vfat (or ntfs), it is quite common that only the UserID can read or write ON that medium.
Look at the mounted fs to see what IT's permissions are, they often are -rwx------
See also the mount options for FAT filesystems, especially the fmask and dmask ones.
The problem is that a vfat filesystem does NOT have the concept of fileowner or group, so the mount program imposes a mask ON it, which often is "only for the mounting UID".
If the filesystems ON the shared media are vfat (or ntfs), it is quite common that only the UserID can read or write ON that medium.
Look at the mounted fs to see what IT's permissions are, they often are -rwx------
See also the mount options for FAT filesystems, especially the fmask and dmask ones.
The problem is that a vfat filesystem does NOT have the concept of fileowner or group, so the mount program imposes a mask ON it, which often is "only for the mounting UID".
The marc directory itself is not a mounted usb drive. There are two drives mounted as subdirectories in there. One is a ext4 filesystem and the other ntfs.
I'm not sure how to check the things you mentioned.
But the first step would be getting access to the marc folder before seeing if I can access the drives from there.
Last edited by marcselman; 02-07-2019 at 01:59 PM.
I noticed there is a + at the end of the permissions for the "marc" directory. Thus, ACL permissions could be the issue. Try 'getfacl marc'. See here for more information https://serverfault.com/questions/22...ions-from-ls-l
I noticed there is a + at the end of the permissions for the "marc" directory. Thus, ACL permissions could be the issue. Try 'getfacl marc'. See here for more information https://serverfault.com/questions/22...ions-from-ls-l
I see thanks.
When I run the command I get:
Code:
marc@media-pc:/media$ getfacl marc
# file: marc
# owner: marc
# group: marc
user::rwx
user:marc:r-x
group::---
group:plex:r-x
mask::rwx
other::rwx
I don't really know how to interpret this.
Any user has rwx, any group has --- and any other has rwx? That makes no sense right...
Last edited by marcselman; 02-08-2019 at 02:29 AM.
Honestly, I do not use ACLs myself for permissions, but, try the following:
Code:
setfacl -Rm g:marc:rwx marc
This is saying to modify (-m) the ACL permissions recursively (-R), by granting those in group (g) marc read, write and execute (rwx) permissions on the marc folder. Alternatively, you could try and remove the ACLs using the following:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.