Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


automount usb disk as user pi
#1
Dear all,
I have a USB disk with music that gets (auto) mounted  by the system at boot time.
It is also correctly visible as SMB drive (from a windows PC).
What complicates matters however is that the owner of the drive is set to root/root, instead of pi/pi.
That means that for the default user, writing is not possible, neither locally nor remotely.
Only by manual unmounting and remounting am I able to correct this.
Is there a way to fix this properly?
Thanks,
Robert
Reply
#2
Starting with moOde 8.3.0 there is no default userid on the ISO image and starting with 8.3.1 there are no dependencies on the userid having to be named "pi".

The userid is setup as part of prepping the image with the Raspberry Pi Imager and can be whatever the user desires thus "pi" can't be assumed anywhere in the code.

To write files to a USB drive locally from SSH prefix the copy command with sudo.

When you say "writing is not possible... remotely" do mean from Windows file explorer?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(06-25-2023, 03:58 PM)Tim Curtis Wrote: Starting with moOde 8.3.0 there is no default userid on the ISO image and starting with 8.3.1 there are no dependencies on the userid having to be named "pi".

The userid is setup as part of prepping the image with the Raspberry Pi Imager and can be whatever the user desires thus "pi" can't be assumed anywhere in the code.

To write files to a USB drive locally from SSH prefix the copy command with sudo.

When you say "writing is not possible... remotely" do mean from Windows file explorer?

Thanks for replying on this subject.
It applies both locally (on the RPI) and remotely (from the PC). Only the root user can write whereas the default user (pi) can read but not write. The simplest would be to grant write access to the local (non root) user. My intend is being able to copy ripped CDs from my PC over the network to the SSD connected to the RPI.
Reply


Forum Jump: