I am trying to manually install a USB hard drive from the command line on my Raspberry Pi. I am following the usual steps: Create a directory in /media, mount the drive,... However I can not access the drive as a regular user and since the root account is disabled...
pi@raspi:/media/pi $ ls -hal total 113K drwxr-x---+ 5 root root 4.0K Oct 1 22:57 . drwxr-xr-x 4 root root 4.0K Oct 1 21:41 .. drwxr-xr-x 6 pi pi 32K Jan 1 1970 342F-8BF2 drwxr-xr-x 5 root root 1.0K Sep 1 11:29 SETTINGS drwx------ 1 root root 72K Sep 24 23:18 toshiba
342F-8BF2 is a pendrive automatically mounted when starting the desktop environmnent, meanwhile
toshiba is the directory that I have created with
mkdir and where the HD is mounted.
How can the desktop create a directory as user
pi with all the permissions that allow me to access/modify the pen drive but I can't?
In order to mount the HD I am using the following command
sudo mount /dev/sdb1 /media/pi/toshiba
and these are the permissions for the
pi@raspi:/media $ ls -hal total 16K drwxr-xr-x 4 root root 4.0K Oct 1 21:41 . drwxr-xr-x 22 root root 4.0K Jun 27 03:09 .. drwxr-x---+ 2 root root 4.0K Sep 22 00:32 peter drwxr-x---+ 5 root root 4.0K Oct 1 22:57 pi