Really simple problem, I have run the following commands:
sudo mkdir /media/usb
sudo chown -R pi:pi /media/usb
show chmod -R 775 /media/usb
Checked everything and made sure that pi
owned the directory, and then ran:
sudo mount /dev/sda1 /media/usb -o uid=pi,gid=pi
The drive is ext4
and if I sudo
it works (I can write to it) but I cannot seem to get it to work so pi
can write without, because when I run the above the command it will reset all permissions to root.
I also cannot seem to get it to auto mount as pi
.
I have eve install ntfs-3g
incase that made any effect, but every time only root can write.
Here is the output of mounting:
pi@raspberrypi:/media $ sudo umount usb
pi@raspberrypi:/media $ ls -la
total 16
drwxr-xr-x 4 root root 4096 Sep 21 13:12 .
drwxr-xr-x 22 root root 4096 Jun 27 02:22 ..
drwxr-x---+ 4 root root 4096 Sep 21 14:24 pi
drwxrwxr-x 2 pi pi 4096 Sep 21 13:12 usb
pi@raspberrypi:/media $ sudo mount /dev/sda1 /media/usb -o uid=1000,gid=1000
pi@raspberrypi:/media $ cd usb
pi@raspberrypi:/media/usb $ ls -la
total 36
drwxr-xr-x 6 root root 4096 Sep 21 14:24 .
drwxr-xr-x 4 root root 4096 Sep 21 13:12 ..
drwxr-xr-x 2 root root 4096 Sep 21 14:24 dfgfdh
drwxr-xr-x 4 root root 4096 Sep 21 14:18 f
drwx------ 2 root root 16384 Sep 21 11:45 lost+found
drwxr-xr-x 2 root root 4096 Sep 21 14:23 swedtfr
pi@raspberrypi:/media/usb $