You are not logged in.

#1 2009-06-16 07:08:20

nonis
Member
Registered: 2009-05-20
Posts: 43

permission denied mounting ntfs partition

I can mount my vfat usb flash drive (sdb1 in the following) and my ntfs windows partition (sda2 in the following) but I can only access (even read) the flash drive as a regular user. If I try to ls the windows partition I get

ls: cannot open directory /windows/: Permission denied

My fstab for the two devices is identical:

/dev/sda2 /windows auto rw,user,noauto 0 0
/dev/sdb1 /media/flash auto rw,user,noauto 0 0

and both mount points have the same permissions before I mount. However, once I mount each one, the permissions change for /windows from

drwxr-xr-x root root

to

dr-x------ root root

while the permissions for the flash drive stay the same.

I've looked around and seen that maybe this is a bug in HAL or maybe I have to change some permissions settings? I added the line from the hal wiki entry to my PolicyKit config but that did not help. Is there a fix for this?

Offline

#2 2009-06-16 07:38:15

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: permission denied mounting ntfs partition

you need to explicitly mount the ntfs partition with ntfs-3g
auto will not do this


neutral

Offline

#3 2009-06-16 08:21:16

nonis
Member
Registered: 2009-05-20
Posts: 43

Re: permission denied mounting ntfs partition

If I use ntfs-3g, I get a permission denied at mount time:

Error opening '/dev/sda2': Permission denied
Failed to mount '/dev/sda2': Permission denied
Please check '/dev/sda2' and the ntfs-3g binary permissions,
and the mounting user ID. More explanation is provided at
http://ntfs-3g.org/support.html#unprivileged

What is ntfs-3g and what is wrong with the ntfs driver?

Offline

#4 2009-06-16 13:25:07

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: permission denied mounting ntfs partition

mount -t ntfs-3g /dev/sda2 /windows -o uid=0,gid=0,noatime,umask=000,locale=en_US.utf8

Offline

#5 2009-06-16 19:51:49

nonis
Member
Registered: 2009-05-20
Posts: 43

Re: permission denied mounting ntfs partition

That worked. Can you explain what these settings do please? [= I will add them to my fstab but I'd like to know what I'm adding so next time I don't end up posting the same question. =P

Also, why do folders show up as blue text with green highlighting and files show up as bold green text in the console for /windows? for any other directory folders are blue and files are white.

Offline

#6 2009-06-16 23:30:06

s3kt0r
Member
Registered: 2009-01-20
Posts: 208

Re: permission denied mounting ntfs partition

man ntfs-3g will tell you more smile , but -o allows for options to be given, such as uid=0 (user id of the owner and 0 is for everybody, if i understood correctly) and gid=0 (group id), noatime can speed up file operations, and locale is to print out informative and diagnostic messages in the set locale.

Last edited by s3kt0r (2009-06-16 23:31:13)


box1: Arch (linux-3.17-rc5)
box2: Gentoo (linux-3.17-rc5)
wm: subtle

Offline

#7 2009-06-17 04:02:22

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: permission denied mounting ntfs partition

The colorization is a ls-option. If you don't like it - put the following in your .bashrc:

unalias ls

The corresponding fstab entry is:

/dev/sda2  /windows  ntfs-3g  defaults,uid=0,gid=0,noatime,umask=000,locale=en_US.utf8  0 0

As for explanation - see above (s3kt0r)

I am 99% certain that it allready can be found in this forum if you just did a search for ntfs or ntfs-3g ...

Offline

#8 2009-06-20 04:13:58

nonis
Member
Registered: 2009-05-20
Posts: 43

Re: permission denied mounting ntfs partition

With the above fstab entry I can not mount windows as a user, even if I add users to the list of options.

I would like to be able to mount my windows ntfs drive as a user and access it as a user.

Offline

#9 2009-06-20 04:51:17

kaola_linux
Member
From: Bacolod City/Philippines
Registered: 2008-09-23
Posts: 513

Re: permission denied mounting ntfs partition

Have you checked this wiki entry? smile

I've used this workaround from the HAL wiki and my ntfs related problems were solved:

# ln -s /sbin/mount.ntfs-3g /sbin/mount.ntfs

Last edited by kaola_linux (2009-06-20 04:57:52)


Netbook (Acer Aspire One 110 || 160gb SATA HD || 1.5gb ram): archlinux i686 / KDEmod 4.3
Registered Linux User # 481212 / Machine Registration # 390468
"In a world without walls and fences, who needs windows and gates?"

Offline

Board footer

Powered by FluxBB