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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-03-2005, 10:08 AM
|
#1
|
|
LQ Newbie
Registered: Mar 2005
Location: Brainerd, MN USA
Distribution: Debian Lenny
Posts: 11
Rep:
|
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
|
|
|
|
03-03-2005, 10:15 AM
|
#2
|
|
Senior Member
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,467
Rep:
|
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.
|
|
|
|
03-03-2005, 10:27 AM
|
#3
|
|
LQ Newbie
Registered: Mar 2005
Location: Brainerd, MN USA
Distribution: Debian Lenny
Posts: 11
Original Poster
Rep:
|
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
|
|
|
|
03-03-2005, 10:30 AM
|
#4
|
|
LQ Newbie
Registered: Apr 2004
Location: Zittau, Germany
Distribution: Debian GNU/Linux (testing-release)
Posts: 9
Rep:
|
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.
|
|
|
|
03-03-2005, 12:07 PM
|
#5
|
|
LQ Newbie
Registered: Mar 2005
Location: Brainerd, MN USA
Distribution: Debian Lenny
Posts: 11
Original Poster
Rep:
|
aeichner
I wonder why I had no problems viewing vfat as a normal user with Mandrake 9.2.
|
|
|
|
03-03-2005, 12:38 PM
|
#6
|
|
LQ Newbie
Registered: Mar 2005
Location: Brainerd, MN USA
Distribution: Debian Lenny
Posts: 11
Original Poster
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:19 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|