LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-07-2019, 01:30 PM   #1
marcselman
LQ Newbie
 
Registered: Feb 2019
Posts: 3

Rep: Reputation: Disabled
Exclamation Have permission but can't access folder


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.
 
Old 02-07-2019, 01:44 PM   #2
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by marcselman View Post
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".
 
1 members found this post helpful.
Old 02-07-2019, 01:57 PM   #3
marcselman
LQ Newbie
 
Registered: Feb 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks for the quick reply

Quote:
Originally Posted by ehartman View Post
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.
 
Old 02-07-2019, 06:51 PM   #4
Corvette
Member
 
Registered: Jul 2017
Location: Missouri, United States
Distribution: Debian 9
Posts: 110

Rep: Reputation: 24
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
 
1 members found this post helpful.
Old 02-08-2019, 02:27 AM   #5
marcselman
LQ Newbie
 
Registered: Feb 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Corvette View Post
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.
 
Old 02-08-2019, 07:15 AM   #6
Corvette
Member
 
Registered: Jul 2017
Location: Missouri, United States
Distribution: Debian 9
Posts: 110

Rep: Reputation: 24
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:
Code:
setfacl -b marc

Last edited by Corvette; 02-08-2019 at 07:18 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File & Folder Permission and Ownership permission error in Cloud storage. rhcekumaran Linux - Newbie 3 06-14-2013 04:41 AM
Have a user only have complete access to one folder riahc3 Linux - Newbie 22 12-29-2012 08:24 AM
nfs server - sharing folder - folder permission dlugasx Linux - Server 1 02-15-2011 12:30 AM
i have given chmod 777 permission for access now how to revert that permission mohdsuboor23 Linux - Server 1 12-11-2010 05:19 AM
permission problem - "You don't have permission to access" radone Linux - General 3 07-24-2006 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration