Core Electronics Forum

RPi4B - External HDD Permissions

Hi all, was hoping to get some help to understand the proper method to auto mount an external HDD on boot, specifically one formatted to FAT32.

I was following this tutorial in order to setup an ethernet samba share for my PS2, but while my external HDD is able to connect, the permissions on it are read only. As such, my PS2 is able to connect to the Samba share but not see any files, and on Windows 10, while I can view the file tree, I cannot create new files/ folders or alter existing ones.

I believe my issue stems from the /etc/fstab config.

The line given in the tutorial is: /dev/sda1 /media/PS2SMB auto nofail,noatime 0 0
Looking at other tutorials and forum posts online, I’ve tried inserting the UUID in place of the /dev/sda1 line, adding the terms vfat and rw, adding a UID of pi and umask of 1000, as well as adding a line after nofail to prevent loading the HDD after 15 seconds. All to no avail; the last attempt I made put my Pi in emergency mode.

I’d love to understand the proper notation and order to get this up and running with full permissions! Cheers!

Hey Matthew,

Which model of the Pi were you using to achieve this, there are a series of ways to cause a Pi to execute commands on start-up as listed in this tutorial. By setting up a mounting script (ie the commands that you would normally use to mount the HDD) to run on every startup the external HDD should essentially be auto mounted.

From Bryce

Hi Bryce, thanks for your response.

I’m using the 4 GB Pi 4B.

I’ve been able to automate the mounting process in the /fstab config (which allows me to mount on boot with access to all users (root, pi)), but I’m struggling to both connect to Windows 10 through the Network as well as allow for read/write permissions for my FAT32 external drive.

I’ve had it half working twice, so hopefully I can bring it all together!

If you mount the partition with the UID= option to gain write access to it, then you need to supply the username and password creditentials when you mount the partition on your Mac/Windows machine, otherwise you’ll only get read access.

There’s a difference between UUID and UID; you’re referring to the latter, correct? I tried removing the UID code segment, but it ended up putting my Pi into emergency mode.

Because I’m using a Guest login for the Samba share, I shouldn’t need to supply the User Pi and associated password if I’m mounting at root.

Here’s the basis of the updated fstab line I’m working with:

UUID=XXXX-XXXX /media/GAMEHD vfat defaults,auto,user,uid=1000,rw,nofail,umask=000,x-systemd.device-timeout=15,noatime 0 0