External hard drives in linux

gene heskett gheskett at shentel.net
Sun Feb 6 18:39:37 UTC 2022


On Sunday, February 6, 2022 12:42:33 PM EST Ralf Mardorf via ubuntu-users 
wrote:
> On Sun, 6 Feb 2022 11:44:29 -0500, Little Girl wrote:
> >Colin Law wrote:
> >>I just use sudo to create the folders I need on the drive and chown
> >>them to the appropriate user.
> >
> >Does that give you and your programs full access to what's in those
> >folders whenever the drive is plugged in?
> 
> The user doesn't get "full access" to /home/, but the user has got
> "full access" to /home/$USER/ ;).
> 
> $ touch test /home/
> $ touch test /home/$USER/
> 
> The click to mount feature's security policy likely follows the same
> access approach.

I got around that on my rpi4, except for later mounts, by, since I'm the 
only user, chown pi:pi /media so pi now owns that whole tree. zero 
traffic on the u-sd card when I build either a realtime kernel or 
LinuxCNC using a 240G SSD on a usb-3 adapter cable. u-sd cards last for 
years that way since you aren't beating it to death doing devel work on a 
pi.

I think on regular wintel installs, since you have both /mnt and /media, 
you could own /media at chmod 0755 and solve all that headache. For 
convienience with mc, copying stuff for a 3d printer here and there, have 
mounted a u-sd card to /media/me/workspace/sdb1 etc, the mount point does 
not have to be the / of the system, just mkdir mount-point anyplace you 
need it, and mount it there. The  biggest PITA is that mount has now been 
hidden from the user. So you must sudo to use it.

Cheers, Gene Heskett.
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>







More information about the ubuntu-users mailing list