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
  • 54,385
Shashi
  • 41
  • 1
  • 1
  • 5

2 Answers2

2

Use sudo:

sudo mount /dev/sda2 /media/shashi/ -t ntfs -o nls=utf8,umask=0222
Eric Carvalho
  • 54,385
  • I did as you told @eric but following error caught me again.

    Windows is hibernated, refused to mount. Failed to mount '/dev/sda2': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.

    – Shashi Jul 06 '13 at 09:35
  • @Shashi See http://askubuntu.com/q/145902/65926 – Eric Carvalho Jul 06 '13 at 13:33
  • When I do this, the mounted folders are read only and I require root access just to change the contents of the mounted folders! Is there a method that doesn't involve crippling the feature? – Nuzzolilo Jan 02 '16 at 23:58
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
  • 102,067