LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 03-03-2005, 10:08 AM   #1
JBB
LQ Newbie
 
Registered: Mar 2005
Location: Brainerd, MN USA
Distribution: Debian jessie
Posts: 14

Rep: Reputation: 0
vfat permissions problem


Debian Sarge, xterm, bash, KDE
Linux version 2.4.27-2-686

I am having trouble mounting my Windows hard drive as a user. No problems as root. <mount -t vfat /dev/hda1 /mnt/Win98>

<cd /mnt/Win98> gets me: "bash: cd: /mnt/Win98: Permission denied"

When I enter <ls -l /mnt/Win98> as a normal user I get bunch of permission denied.

If I enter <ls -l> from /mnt as normal user I can then view the directory's attributes which are:
"drwxr--r-- 43 root root 4096 2005-02-23 12:25 Win98"

When I enter <ls -l /bin/mount> the attributes displayed are:
"-rwsr-xr-x 1 root root 76888 2004-09-23 23:34 /bin/mount"

When I enter the command as normal user <mount -t vfat /dev/hda1 /mnt/Win98> I get: "mount: only root can do that". Looking at the attributes for mount I don't understand why I can't use it. Also, <type mount> = "mount is hashed (/bin/mount)".

Now I am going to <su>...done.

Enter <mount -t vfat /dev/hda1 /mnt/Win98> I get the message:
"mount: according to mtab, /dev/hda1 is already mounted on /mnt/Win98". So it seems to be mounted at bootup.

Exit su (Ctrl-d).

As root I have tried:
<chmod ugo=xrw /mnt/Win98>
<chmod 777 /mnt/Win98>
<find /mnt/Win98 -type d exec chmod 777 {} \;>

Know matter what I do, I can view /mnt/Win98 as root only. I have searched and searched, but nothing seems to work. This is driving me crazy. Is there a text file I can manually enter the permissions into?

A cry for help!

Thanks
JBB
 
Old 03-03-2005, 10:15 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Have you tried putting this in you /etc/fstab:

/dev/hda1 /mnt/win vfat user,exec,dev,suid,rw,umask=000,auto 0 0

after of course ensuring that you have created a "win" directory in the "mnt" directory?

This works fine on Rh9 - I can read/write my windows partition as any user. Take note though that Linux cannot as yet write NTFS - so if your XP partition is NTFS formatted, you're outta luck. I specifically installed XP so that it was forces to use FAT32, since I wanted Linux compatibility with the the XP partition.
 
Old 03-03-2005, 10:27 AM   #3
JBB
LQ Newbie
 
Registered: Mar 2005
Location: Brainerd, MN USA
Distribution: Debian jessie
Posts: 14

Original Poster
Rep: Reputation: 0
This is my /etc/fstab file

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hdb1 / ext3 defaults,errors=remount-ro 0 1
/dev/hdb9 /home ext3 defaults 0 2
/dev/hdb8 /tmp ext3 defaults 0 2
/dev/hdb5 /usr ext3 defaults 0 2
/dev/hdb6 /var ext3 defaults 0 2
/dev/hdb7 none swap sw 0 0
/dev/hdc /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/hda1 /mnt/Win98 vfat ro,user,auto 0 0
 
Old 03-03-2005, 10:30 AM   #4
aeichner
LQ Newbie
 
Registered: Apr 2004
Location: Zittau, Germany
Distribution: Debian GNU/Linux (testing-release)
Posts: 9

Rep: Reputation: 0
Hi there,

the problem is VFAT does not support owner/group/others-permissions, so all files and directories are owned by only one user - the mounting user by default. I have a line like this in my /etc/fstab:

/dev/hdb1 /mnt/wine vfat codepage=850,user,noauto 0 2

and if I do the command:

mount /mnt/wine

as user the mtab shows:

/dev/hdb1 on /mnt/wine type vfat (rw,noexec,nosuid,nodev,codepage=850,user=aeichner)

wich means, all files are owned by the mounting user (the user= entry). If you set the option "auto" in the fstab, the mounting user at system startup is a root-process and all files will be owned by root.
A good solution for using the auto-option would be to explicitly set owner-, user-id and/or umask/dmask as mount-option in fstab.
So if you want to use the auto-option in fstab, use other options (fat and vfat-sections in "man mount") to modify the default behaviour.
 
Old 03-03-2005, 12:07 PM   #5
JBB
LQ Newbie
 
Registered: Mar 2005
Location: Brainerd, MN USA
Distribution: Debian jessie
Posts: 14

Original Poster
Rep: Reputation: 0
aeichner

I wonder why I had no problems viewing vfat as a normal user with Mandrake 9.2.
 
Old 03-03-2005, 12:38 PM   #6
JBB
LQ Newbie
 
Registered: Mar 2005
Location: Brainerd, MN USA
Distribution: Debian jessie
Posts: 14

Original Poster
Rep: Reputation: 0
rylan76

rylan76 Thanks, that let me enter the /mnt/Win98 directory as a normal user, but I can't "see" anything in there as a normal user.

Edit: I can't "see" anything as root either.

Last edited by JBB; 03-03-2005 at 01:46 PM.
 
  


Reply



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
VFAT mount permissions duckboy Linux - General 6 07-26-2005 03:56 AM
mounted vfat permissions n3tw0rk Linux - General 3 12-05-2003 04:41 PM
Permissions problem in mounted vfat partition SparceMatrix Linux - Security 3 04-04-2003 04:19 PM
Permissions problem in mounted vfat partition SparceMatrix Linux - General 2 02-17-2003 02:49 PM
vfat write permissions andrea.corelli Linux - General 4 04-23-2002 02:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:49 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
Open Source Consulting | Domain Registration