Only Root Can Mount on Raspberry Pi

8,103

You should change your /etc/fstab entry to this:

/dev/sda1         /media/USB96    ext4    defaults,user           0       0

According to the fstab(5) manpage, the user option allows any user to mount the file system.

Share:
8,103

Related videos on Youtube

Damanjit Singh
Author by

Damanjit Singh

Updated on September 18, 2022

Comments

  • Damanjit Singh
    Damanjit Singh almost 2 years

    I am new to UNIX and I have been trying to setup Transmission on my new Raspberry Pi. I have formatted my external USB drive to ext4 and added the following line to the /etc/fstab.

    /dev/sda1         /media/USB96    ext4    defaults           0       0
    

    It works fine but when I login as pi (instead of root) it returns an error when mounting the drive

    mount: only root can do that
    

    I'm stuck here because when I try to download a torrent with the Transmission web interface it also returns an error:

    Permission denied (/media/USB96/torrents/complete/my torrent link)
    

    Please help me to solve this problem and tell me how to allow the normal user pi to mount and have access to the USB drive.

  • Ignacio Vazquez-Abrams
    Ignacio Vazquez-Abrams about 11 years
    Depends on other factors.
  • Damanjit Singh
    Damanjit Singh about 11 years
    Which factor, will you please explain?
  • Ignacio Vazquez-Abrams
    Ignacio Vazquez-Abrams about 11 years
    Whether or not you're running anything that will automount it.
  • Damanjit Singh
    Damanjit Singh about 11 years
    If you have any good tutorial in mind on how to setup transmission with external usb, please tell me.
  • Ignacio Vazquez-Abrams
    Ignacio Vazquez-Abrams about 11 years
    Transmission doesn't get "setup" with an external USB drive.
  • Damanjit Singh
    Damanjit Singh about 11 years
    help me please!
  • Rain
    Rain about 11 years
    Sorry. I meant /media/ instead of /mnt/. Check my edit above. If you noticed this already, as pi, can you cd /media/USB96 and create a file with touch test.file? If not, what error does it throw?
  • BowlesCR
    BowlesCR over 10 years
    This is the "proper" way to do it. Alternatively, if the device names aren't predictable, use sudo.