LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-16-2005, 03:54 PM   #1
chris01
LQ Newbie
 
Registered: Sep 2005
Distribution: Kubuntu/Ubuntu 5.04
Posts: 2

Rep: Reputation: 0
accessing mounted partitions


Hey guys, I'm knew and this is my first time posting here. I'm also very knew to linux in general.

Here's my first question:

I have 3 hard drives on my computer one SATA and two altra ATAs. Windows XP Pro is on my SATA raptor, then Ubuntu/Kubuntu 5.04 is on my master ata drive ( hda ) and finally I have a ntfs partition on my third drive serving as my Win XP backup drive. What I want to do is to be able to mount my hdb drive so I can access my MP3s on linux. So here's what I do.

First I change to SU mode because only root can mount partitions I guess.
then I type the following

mount /dev/hdb1 /mnt

However, when I go to access it thorugh konqueror, I get access denied.

How do I get around that?

Thanks very much for any help!
 
Old 09-16-2005, 04:02 PM   #2
addy86
Member
 
Registered: Nov 2004
Location: Germany
Distribution: Debian Testing
Posts: 332

Rep: Reputation: 31
Type
grep /dev/hdb1 /etc/fstab
Is the output non-empty? If yes, does the line contain something like "user"? If yes, you should be able to mount it (as normal user) by saying
mount /mount/point
where /mount/point is the value of the second column of that line.
 
Old 09-16-2005, 04:06 PM   #3
jfryman
Member
 
Registered: Dec 2004
Location: Newport News, Virginia
Distribution: CentOS 4, FC4, Ubuntu Breezy/Dapper, Arch 0.7.1
Posts: 40

Rep: Reputation: 15
I may be telling why it is happening incorrectly, so someone please feel free to correct me... but here it is.

Because NTFS does not support traditional UNIX type file permissions, and uses Security Identifiers (SID) to enforce ACL's, Unix does not know how to assign user and group permissions to the mount. As a result, all files are automatically (and temporarily as not to damage the guest file system) set owner and group as the user who mounts the files. In this case, root!

As a normal user, you cannot read/write root's files. The workaround for this is to mount the file system with umask constraints. I'm assuming this is a single-user computer, and so setting a umask of 0000, which is essentially read/write/execute for user/group/all.

try this.
Code:
 mount /dev/hdb1 /mnt -o umask=000
This should mount the filesystem so you can now read it as a normal user. Keep in mind, this allows *any* user to read the files... and like I mentioned earler... could be a security issue.

from there, you should be able to add fstab entries to ensure mounting at bootime. Something like this:
Code:
 /dev/hdb1      /mnt     ntfs    user,umask=0000    0 0
Hope that helps you out! Good luck!

-James
 
Old 09-16-2005, 05:19 PM   #4
chris01
LQ Newbie
 
Registered: Sep 2005
Distribution: Kubuntu/Ubuntu 5.04
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks a lot jfryman, that worked perfect!

I added the entry in my fstab file and now it's mounted somewhere in my home folder every time i start linux.
 
Old 09-19-2005, 02:33 AM   #5
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,835

Rep: Reputation: 260Reputation: 260Reputation: 260
In /etc/fstab you have

device /mount/point file system
/dev/hdb /mnt/windows NTFS

options fsck order
rw,users,noauto,gid=users,umask=0002,nls=utf8 0 0

You can't mount partitions in directories which have subdirectories, such as /mnt. You have to make a directory in /mnt, like /mnt/windows. Then you don't put any files or directories in there. You use it as a mount point.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Forbidden error with Apache when accessing mounted folder. maneeshsethi Linux - Newbie 2 12-22-2004 01:48 AM
problem accessing mounted hdd linuxmandrake Linux - Newbie 1 11-20-2004 05:37 PM
Accessing a mounted smb share hangs haddad Linux - Wireless Networking 0 07-24-2004 06:52 AM
Accessing mounted fat32 partitions as user linuxgamer09483 Linux - Newbie 3 02-13-2004 06:43 PM
problems accessing mounted drives! kierse Slackware 17 01-25-2004 05:38 PM


All times are GMT -5. The time now is 04:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration