LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-21-2005, 02:16 AM   #1
drguitarum2005
Member
 
Registered: Nov 2004
Distribution: Suse 9.3 Pro
Posts: 34

Rep: Reputation: 15
Mounting windows partition


I am using Gentoo with Kde 3.3.2 and have successfully mounted my existing windows partition via /mnt/windows but only as root. I am unable to access that partition as my regular user and even as root I can't seem to use xmms or mpg123 to play songs on that partition. Can anyone help me so my regular user can mount it and I can easily access all the files? Thanks!

Also, I reinstalled a program that I accidentally messed up but its the same messed up one when i launch it. How can I uninstall it (it was a normal tarball and i did make | make install etc) so I can install clean? Thanks.
 
Old 02-21-2005, 02:36 AM   #2
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
For the windows files, is it NTFS. If so, I imagine that the everyone group has to have read access to the files. XP SP2 should have removed the everyone group from files.
 
Old 02-21-2005, 02:36 AM   #3
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,161
Blog Entries: 4

Rep: Reputation: 136Reputation: 136
Just post the content of your /etc/fstab file. I'll tell you which line to modify to allow users to mount and unmount the partition.
 
Old 02-21-2005, 02:37 AM   #4
Davidian1024
Member
 
Registered: Jun 2004
Location: Cleveland, Ohio, USA
Distribution: LFS
Posts: 35

Rep: Reputation: 15
mount options

I'm not too familiar with Gentoo, but I believe I can help.

In order to grant normal users access to mounting filesystems you must specify this in /etc/fstab.

Example (my /etc/fstab):
# Begin /etc/fstab

# File system Mount-point FS-type Options Dump FSCK-order

/dev/sda1 / ext2 defaults 1 1
proc /proc proc defaults 0 0
sys /sys sysfs defaults 0 0
devpts /dev/pts devpts gid=4,mode=620 0 0
/dev/sdb1 /media/usbkey/1 vfat noauto 0 0
/dev/sdb2 /media/usbkey/2 ext2 noauto 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/dev/dvd /media/dvd auto noauto,user 0 0
/dev/fd0 /media/floppy auto noauto 0 0

# End /etc/fstab

Note the /dev/dvd line. The fourth item is 'noauto,user'. The user option allows normal users to mount this filesystem.


The other problem you mentioned was normal users not being able to access files within that filesystem. This is probably because the mount point /mnt/windows does not have the appropriate permissions set.
 
Old 02-21-2005, 02:41 AM   #5
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,161
Blog Entries: 4

Rep: Reputation: 136Reputation: 136
No. On some systems (e.g. like BeOS and Windows > 9x), you cannot access certain files from Linux even as root because the permissions are set from the other OS.

The only way to solve it is to reboot to the other OS as administrator and set the permissions for each file you want to allow users to read and/or write.
 
Old 02-21-2005, 02:42 AM   #6
drguitarum2005
Member
 
Registered: Nov 2004
Distribution: Suse 9.3 Pro
Posts: 34

Original Poster
Rep: Reputation: 15
Code:
# /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.14 2003/10/13 20:0$
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.

# <fs>                  <mountpoint>    <type>          <opts>                 $

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda1               /mnt/windows    ntfs            defaults,noatime       $
/dev/hda2               /boot           ext3            defaults,noatime       $
/dev/hda4               /               ext3            noatime                $
/dev/hda3               none            swap            sw                     $
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,user            $
#/dev/fd0               /mnt/floppy     auto            noauto                 $

# NOTE: The next line is critical for boot!
none                    /proc           proc            defaults               $

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:

none                    /dev/shm        tmpfs           defaults
 
Old 02-21-2005, 02:47 AM   #7
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,161
Blog Entries: 4

Rep: Reputation: 136Reputation: 136
Try changing the line
Code:
/dev/hda1               /mnt/windows    ntfs            defaults,noatime
to
Code:
/dev/hda1               /mnt/windows    ntfs            user,defaults,noatime
To be able to access those files that even root cannot access, you need to change file permissions from your other OS (Windows NT/2000/XP I guess) to allow users to read and/or write.

Last edited by vharishankar; 02-21-2005 at 02:49 AM.
 
Old 02-21-2005, 12:24 PM   #8
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Rep: Reputation: 35
Type in console:
man mount
This will provide you with the great amout of info about NTFS,FAT32,EXT2,EXT3... partition options, access options, etc...
Mans sometimes help
 
Old 02-23-2005, 12:13 AM   #9
drguitarum2005
Member
 
Registered: Nov 2004
Distribution: Suse 9.3 Pro
Posts: 34

Original Poster
Rep: Reputation: 15
99% of the time I seem to be able to mount it fine as root . When I use mpg123 in console to play a song on the windows partition when im root, itll usually play (well it has been lately), sometimes with a little hesitation but thats not the issue. When I am as my regular user, access is denied to me at /mnt/windows. How can my regular user access it?
 
Old 02-23-2005, 12:22 AM   #10
Davidian1024
Member
 
Registered: Jun 2004
Location: Cleveland, Ohio, USA
Distribution: LFS
Posts: 35

Rep: Reputation: 15
I think Harishankar was right when he said the permissions are set from the other OS. You'll have to change them from there. And I have no idea how you would do that.
 
Old 02-23-2005, 12:25 AM   #11
drguitarum2005
Member
 
Registered: Nov 2004
Distribution: Suse 9.3 Pro
Posts: 34

Original Poster
Rep: Reputation: 15
I'll gladly try that when I figure out how to do it but isn't it weird how root can access but regular user can't? That seems like a linux issue to me
 
Old 02-23-2005, 12:34 AM   #12
Davidian1024
Member
 
Registered: Jun 2004
Location: Cleveland, Ohio, USA
Distribution: LFS
Posts: 35

Rep: Reputation: 15
I tried mounting my NTFS partition to see what the permissions were like. Here's an example:
Code:
total 1573468
-r--------  1 root root          0 Dec 14 03:45 AUTOEXEC.BAT
-r--------  1 root root          0 Dec 14 03:45 CONFIG.SYS
dr-x------  1 root root       4096 Dec 14 23:56 Documents and Settings
-r--------  1 root root          0 Dec 14 03:45 IO.SYS
dr-x------  1 root root          0 Dec 26 03:14 Incoming
-r--------  1 root root          0 Dec 14 03:45 MSDOS.SYS
-r--------  1 root root      34724 Dec 14 03:53 NTDETECT.COM
dr-x------  1 root root       4096 Dec 15 00:09 Program Files
dr-x------  1 root root          0 Dec 14 23:56 RECYCLER
dr-x------  1 root root          0 Dec 14 03:49 System Volume Information
dr-x------  1 root root      40960 Dec 26 03:29 WINNT
dr-x------  1 root root          0 Dec 14 04:06 WUTemp
-r--------  1 root root     150528 Jun 19  2003 arcldr.exe
-r--------  1 root root     163840 Jun 19  2003 arcsetup.exe
dr-x------  1 root root          0 Dec 26 03:42 bcd
-r--------  1 root root        192 Dec 13 22:40 boot.ini
-r--------  1 root root     214432 Dec 14 03:53 ntldr
-r--------  1 root root 1610612736 Jan 16 22:02 pagefile.sys
The R's are only set for the user who owns that file. And if you look at the owner it is root.
 
Old 02-23-2005, 12:49 AM   #13
Davidian1024
Member
 
Registered: Jun 2004
Location: Cleveland, Ohio, USA
Distribution: LFS
Posts: 35

Rep: Reputation: 15
I was just thinking about another possibility. NTFS is a proprietary to Microsoft. The module that comes with Linux for accessing NTFS partitions was made by kernel hackers through reverse engineering. Microsoft is not about to provide them with NTFS documentation. The NTFS module is far from complete. It just recently started providing write access to NTFS partitions, and this is extremely limited. What I'm getting at is that the linux NTFS module may simply be giving Linux some safe permissions. It may not know how to read them from the NTFS partition. You might be stuck with this the way it is. I was looking through more of my NTFS filesystem and here's what I found:

All files have this permission set: -r--------
All directories have this permission set: dr-x------
Everything's owning user and group is set to 'root'

I find it hard to believe that the permission setup in windows is so uniform.
 
Old 02-24-2005, 03:30 PM   #14
cagey0
LQ Newbie
 
Registered: Feb 2005
Posts: 2

Rep: Reputation: 0
I'm having the same problem.

FAT32, to my knowledge doesn't have user access lists similar to, say NFTS, Ext2/3. Even so, I've set Shares on the root and folders
I'm interested in to no avail.

root is owner and any attempts to change access rights to the
mount point /mnt/media make no difference.

Not an answer but hopefully a useful pointer.

 
Old 02-24-2005, 05:26 PM   #15
cagey0
LQ Newbie
 
Registered: Feb 2005
Posts: 2

Rep: Reputation: 0
Getting there.

Looks like all options must be specified at the time of reading /etc/fstab whilst booting. Has nothing to do with security settings
in windows, as previously suspected.

try:
/dev/hdb1 /mnt/media vfat user,gid=users,umask=0002 0 0

Not too sure on the mask at present (mount should hold answers when i get round to reading it but comma bit as follows:

user -> allows user to mount this volume(?)
gid=users -> makes users the group owner of the mount point
umask -> does something magical i don't yet understand.

Main thing is IT WORKS!!!



now just to get the damn printer working
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting my windows partition NNP Linux - General 5 08-03-2005 07:59 AM
mounting windows partition acidbreez Linux - Hardware 13 01-19-2004 12:21 PM
Mounting Windows Partition pibby Fedora 3 11-19-2003 05:46 PM
mounting a windows partition? codename000 Linux - Newbie 1 04-15-2003 10:27 PM
mounting windows partition. FLuff_Suit Linux - General 2 05-10-2002 12:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:10 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