Solved

Mount NTFS Drive - Permission Denied to Open

Posted on 2004-10-11
14
1,248 Views
Last Modified: 2008-01-09
I am trying to find a way to mount my NTFS drive under my standard user ID.  I can mount it and access it under root with no problems.  When I mount it under my standard user ID I don't have sufficient permissions to view the contents of the drive.  I have tried to change the permissions of the device by typing chmod 666 /dev/hda, but that didn't fix the issue.  I don't have to access data very often, but it is very inconvenient to log in as root just to access a file.
0
Comment
Question by:aaeandcee
  • 8
  • 6
14 Comments
 
LVL 10

Expert Comment

by:Luxana
ID: 12283088
Hi

One is that you need to configure /etc/fstab
For example entry in my /etc/fstab :
/dev/hda4          /mnt/ntfs                            ntfs           noauto,users               0     0

cause mount and unmount  /dev/hda4 for all users.
so

option users allows any user to mount and unmount the filesystem.
0
 
LVL 10

Expert Comment

by:Luxana
ID: 12283508
just for more info about how to mount NTFS here is link:

http://www.justlinux.com/nhf/Filesystems/Mounting_NTFS_Filesystems.html
0
 

Author Comment

by:aaeandcee
ID: 12285517
I can successfully mount the drive, what I am having problems doing is gaining access to the mount folder.  The message I get as an ordinary user is:  

"The folder contents could not be displayed"  "You do not have the permissions necessary to view the contents of "ntfs".

0
 
LVL 10

Expert Comment

by:Luxana
ID: 12285673
what is you absolute path for mounting ntfs partition?

make sure that your users have parmition in parrent directories as well !! When you get into mounted directory like root to who belongs files and directories?
0
 

Author Comment

by:aaeandcee
ID: 12286287
I've tried creating the mount point under /home/myname/ntfs as well as /mnt/ntfs and both have given me denied messages.  
0
 
LVL 10

Expert Comment

by:Luxana
ID: 12286562
for mount use command :

# mount /dev/hdaX -t ntfs -o ro,users,umask=0007,gid=1000 /mnt/ntfs

or

/etc/fstab options like this?

ro,user,noauto,umask=0007,gid=1000

so whole line will look like :

/dev/hdaX       /mnt/ntfs      ntfs    ro,users,noauto,umask=0007,gid=1000        0       0


then

#mount /mnt/ntfs

0
 

Author Comment

by:aaeandcee
ID: 12291629
I still can't access the drive.  
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 10

Expert Comment

by:Luxana
ID: 12292129
paste here exactly what you doing and output from
# fdisk -l
and also error message what you get when you attempt accese mountet ntfs filesystem.
0
 

Author Comment

by:aaeandcee
ID: 12292468
The line in the FSTAB that references the NTFS drive is exactly as follows:
/dev/hda1             /mnt/ntfs                  ntfs    ro,users,noauto,umask=0007,gid=1000      0 0

I have created a directory under /mnt named ntfs

From a comand prompt I issue mount /mnt/ntfs

When I go to access the drive I get the following error:

"The folder contents could not be displayed"  "You do not have the permissions necessary to view the contents of "ntfs"

If I log in as root I have full access to the drive, but when I log in as an ordinary user I am able to map but unable to access.

The fdisk command refuses to run under my user account.
0
 

Author Comment

by:aaeandcee
ID: 12292493
I logged in as root and was able to execute the fdisk command.

[root@localhost root]# fdisk -l
 
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1        9729    78148161    7  HPFS/NTFS
 
Disk /dev/hdb: 30.7 GB, 30736613376 bytes
16 heads, 63 sectors/track, 59556 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1       59556    30016192+  83  Linux
 
Disk /dev/sda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3315    26627706    7  HPFS/NTFS
/dev/sda2            3316       13004    77826892+   7  HPFS/NTFS
/dev/sda3           13005       13017      104422+  83  Linux
/dev/sda4           13018       14946    15494692+   f  W95 Ext'd (LBA)
/dev/sda5           13018       14692    13454406   83  Linux
/dev/sda6           14693       14946     2040223+  82  Linux swap
 
Disk /dev/sde: 8 MB, 8110080 bytes
2 heads, 16 sectors/track, 495 cylinders
Units = cylinders of 32 * 512 = 16384 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *           1         494        7891+   1  FAT12
[root@localhost root]#

0
 
LVL 10

Expert Comment

by:Luxana
ID: 12295020
did try get in to /mnt/ntfs directory like normal user before you mount ntfs filesystem? try if you have read read write permitions.
0
 
LVL 10

Expert Comment

by:Luxana
ID: 12296643
hi

this permitions problems appears only with ntfs filesystem?
0
 

Author Comment

by:aaeandcee
ID: 12296991
Yes, I have full read and write ability to the folder--just tested it.

Yes, only with the NTFS partition.  I have a memory card and memory stick drive (both formatted with fat), as well as an ext3 formatted drive.  I can access all those drives with no problems.
0
 
LVL 10

Accepted Solution

by:
Luxana earned 50 total points
ID: 12297267
try different umask for other read and write:

# mount /dev/hdaX -t ntfs -o ro,users,umask=0000,gid=1000 /mnt/ntfs  

and also try without gid

# mount /dev/hdaX -t ntfs -o ro,users,umask=0000 /mnt/ntfs  



0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now