LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   VFat External Drive, File Permissions (https://www.linuxquestions.org/questions/linux-newbie-8/vfat-external-drive-file-permissions-4175470850/)

dchaps 07-25-2013 03:43 AM

VFat External Drive, File Permissions
 
Hi,

I'm having trouble with permissions on my VFat external drive hooked up to a Raspberry Pi. I have a samba file server (the drive is being used by samba) on the Pi and have recently installed Minidlna. The problem I'm having is that Minidlana doesn't have permission to access the external drive.

Is there an easy fix or should I change the format of my drive to make permissions easier? (Unfortunatley I need to access with it a windows computer through the samba file server)

The hard drive partition (sda3) is mounted in the fstab as
Code:

/dev/sda3      /media/sda3    vfat    rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0777,dmask=0777 0 4
The minidlna user is in the group id=1000. (That may or may not have been a good idea)

Any ideas?

GlennsPref 07-25-2013 04:15 AM

Quote:

Hi, Welcome to LQ!

LQ has a fantastic search function that may save you time waiting for an answer to a popular question.

With over 4 million posts to search it's possible the answer has been given.
:)
lmgtfy

there are 2 search options here,

Quote:

site: linuxquestions.org fstab vfat
and

Quote:

site: linuxquestions.org fstab smb
any questions?

selfprogrammed 07-25-2013 10:32 PM

VFAT permissions would only affect permissions to directories within the VFAT.
Linux filesystem drivers make default assumptions that allow VFAT to work, when it needs a permissions bit that is not present. I use VFAT on memory sticks all the time, and the files transfer to Linux with an execute privilege set that they did not have when saved.

I suspect that changing the disk format would not affect this problem.

Your fstab line does not have the USER flag. That would let non-root users mount the drive.
You have some default permissions set for mounting, but I cannot say that those would affect your samba permissions problem. Those would affect permissions seen by a Linux user (or program) directly accessing the mounted drive on the Linux system, after it had been mounted with fstab settings.

Permissions to a mounted drive are also affected by the permissions of the mount point, and the permissions allowed by the user (or root) that mounted it. It is owned by the user that mounts it.

If it actually had the permissions mask from fstab, it would not matter what the group was.
You should determine if it is being mounted with those default values, or with some other specifications in the mount command.
If it is mounted by a program, it does not have to use the fstab default settings.

I am not familiar with the specific programs, and they may (samba probably) have more permissions specially for network access (samba). Also be aware that some file servers demand exclusive access to a drive they are serving. They insist that all access go through the file server. I am not familiar if Samba behaves this way, or if there is a setting to make it behave this way.

I would suspect some permissions problem in the samba setup. File servers can be very specific with independent permissions. Unfortunately, I do not use Samba, so I can not say any more about it.

dchaps 07-26-2013 08:00 PM

Thanks
 
Cheers for the help. I had been searching for the wrong things. I found a solution here.

The solution was to use
Quote:

[device] [mount point] vfat users,rw,exec,umask=000
Thanks for you help.


All times are GMT -5. The time now is 07:15 AM.