External SSD not writable

Hi all,
I’ve just installed dietpi on an old Raspberry Pi 1B and I’ve a little problem with my external SSD. Basically I’ve it mounted using dietpi mount utility in /mnt/data but I cannot write file inside of it. I’ve not modify anything inside fstab and it’s set to rw so I don’t know why doesn’t work. Here the entry

UUID=D08C-9B1F /mnt/data vfat noatime,lazytime,rw,nofail,noauto,x-systemd.automount

Any help? Thanks

Welcome to our community.

What app or user should write to the disk? Because it is formated using vfat, which is not a Linux file system format and limit the possibility of users that could write on it.

I would like to write on it with the default dietpi user and directly with aria2 (which I’ve to admit I didn’t understand if s it’s own user or not)

Thanks a lot

Small edit: I don’t mind formatting and using another filesystem if will make things easier/cleaner

I highly recommend to use ext4 file system format. This way you can setup appropriate file system permission to allow different users instead of root user only, like it is on vfat.

1 Like

Ok so I’ll try to format in ext4 and see :smiley:

UPDATE: I’ve formatted it in ext4 and mounted using dietpi drive utility but still I cannot write on it as dietpi user or with aria2. I think I’m missing something?
Fstab has the rw option so I cannot understand why only root can write on it

Edit: spelling

You still need to set correct permission for user and groups to allow access. A small guide on Linux file system permission can be found on File Permissions in Linux / Unix: How to Read, Write & Change?

Have a look on what is set currently

ls -la /mnt/data

Try to change permissions chmod 777 -Rv /mnt/data

No don’t do this, every user can then read, write and execute everything on this drive.

You could use chown to make the dietpi user the owner of this drive.
And then you can do chmod 644 -R /mnt/data which will give read and write to dietpi user and to every other user only read permissions. Or maybe 744, then the dietpi user can even execute stuff, if you need.

If you want to let other users write to this drive (e.g. as working directories for some software) then I would create another user group (named e.g. USB) and assign every needed user to this group and chown the drive to this group. If you install new software which brings new users, just add them to the group if needed.

1 Like

Ye I’ve done just that…almost, I’ve chown the main folder to dietpi and now that user can write without problem. Only aria2 cannot write in it, but I don’t understand why due to the fact that aria2 seems to not have a user associated with it.

Could you change group to dietpi as well and give write permission to the group