How do I change permissions on FAT32 USB drive on Raspberry Pi

90 views Asked by At

I have a Raspberry Pi 4 operating as a Plex media server witgh an externalk USB drive as media storage, the drive mounts and it perfectly usable but after the reinstall of the latest OS I cant remember the setting to allow read write to the USB drive, when I change it in filemanager it fails - any ideas? Cheers

I've tried lots of different advice from google searches but most seem to be focussed on mounting the drive, its mounted and working perfectly as stroage i just cant delete or add files without plugging the drive into another computer

1

There are 1 answers

0
rulf On

Based on your description I am not sure if you want to automatically mount the drive or not so here goes both alternatives.

1. Mount temporary

This will mount the drive until the next reboot. Open a terminal and find the path to your drive (if you don't already know)

sudo blkid

Then to mount it use the following command

sudo mount -o umask=0,uid=nobody,gid=nobody /dev/MY_USB_DRIVE /mnt/WHERE_I_WANT_IT_MOUNTED

This will mount the drive with read write permissions for everyone. uid=nobody and gid=nobody are redundant and just added for clarity.


2. Auto mount at startup

Open the fstab file:

sudo nano /etc/fstab

Then add something like this line to the file

/dev/MY_USB_DRIVE /mnt/WHERE_I_WANT_IT_MOUNTED auto users,noatime,umask=0 0 0

Also make sure you have created the mount point:

sudo mkdir /mnt/WHERE_I_WANT_IT_MOUNTED

Then change the permission of your mount point using

chmod -R 775 /mnt/WHERE_I_WANT_IT_MOUNTED

Try approach 1 first to make sure it works as intended, then proceed to approach 2 if needed.