oman
Why not just change the label name on the partition?
Also I dont see how the method used to mount a filesystem is relevant to the ownership of files already existing on that filesystem. You must have transferred the files to the disk as root or something, in which case you can fix that by changing their ownership with chown.
Files are owned by the user that created them in normal situations. When transferring files to your Pi over the network, authenticate as the pi user when connecting and they'll be owned by that user simple as that.
This seems to a classic XY problem where you seem to be chasing a complex secondary solution to an easily avoidable issue.
(09-27-2019, 11:30 PM)Meloman Wrote:(09-27-2019, 10:57 PM)Tim Curtis Wrote: Hi,
USB storage devices are auto-mounted by moOde using the udisks-glue utility. There is no need to configure fstab, in fact it will conflict with auto-mounting. The auto-mounting process also creates a Samba share block so the drive can be remotely accessed.
There is also a setting in Library Config that controls whether to automatically run MPD update after insert/remove USB storage device. The default is NO which means that you need to click UPDATE or RE-GEN MPD database.
After MPD database update is complete (no spinner icon) click UPDATE or RE-GEN album cover thumbnail cache.
-Tim
Thank you for fast reply.
Everything what you wrote is familiar to me. My problem concerns mounting that USB drive with other user than root (uid=0). The most preferred case is to mount whole drive with "pi" user (uid=1000) so every file and directory on that USB drive would be owned by "pi" and not "root". Another problematic thing is that automounted USB drive (its 2.5 inches Hitachi) is uncomfortably named under the path "/media/TOURO S" (with space). I suppose the name of that directory came from the model name of the HDD (maybe it is in its label). For me the preffered way is "/media/touro" so I just could forget about all uppercase and the space when I want to address files by its path. If USB drive automounting is only way it has to work - Can I configure that udisk-glue to mount my drive with this params?
UUID=E4641EBA641E9002 /media/touro ntfs-3g defaults,nls=utf8,umask=000,dmask=027,fmask=137,uid=1000,gid=1000,windows_names 0 0
Best regards
Why not just change the label name on the partition?
Also I dont see how the method used to mount a filesystem is relevant to the ownership of files already existing on that filesystem. You must have transferred the files to the disk as root or something, in which case you can fix that by changing their ownership with chown.
Files are owned by the user that created them in normal situations. When transferring files to your Pi over the network, authenticate as the pi user when connecting and they'll be owned by that user simple as that.
This seems to a classic XY problem where you seem to be chasing a complex secondary solution to an easily avoidable issue.