2

When I tried to mount my hard drive following error got displayed. I am very new to linux. Please help.

mount /dev/sda2 /media/shashi/ -t ntfs -o nls=utf8,umask=0222
mount: only root can do that

what should I do to give root level access?

Eric Carvalho
  • 55,453
Shashi
  • 41

2 Answers2

2

Use sudo:

sudo mount /dev/sda2 /media/shashi/ -t ntfs -o nls=utf8,umask=0222
Eric Carvalho
  • 55,453
0

You will have to mount the partition as root unless you add an entry to /etc/fstab

If you want to mount the partition as a user, without root access,

Open /etc/fstab as root. In a terminal, run

sudo nano /etc/fstab

At the bottom of the file add

/dev/sda2 /media/shashi/ ntfs users,noauto,nls=utf8,umask=0222 0 0

Change "noauto" to auto if you want it to automatically mount when you boot.

Then, make the mount point if it does not exist

sudo mkdir /media/shashi

Then you can mount as a user.

mount /media/shashi

For details see

https://help.ubuntu.com/community/Fstab

https://help.ubuntu.com/community/AutomaticallyMountPartitions

Panther
  • 104,528