LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-27-2004, 05:13 PM   #1
Nukem
Member
 
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373

Rep: Reputation: 30
Cant read/write to second hard disk under normal user


I have recently installed a second hard disk on my computer. But the problem is that I can't read or write to this second disk under a normal user account. When I mount it and open it, I get the message saying, "Access Denied".
But when I log in as root, I can read and write with no problem. This is like my second week using linux and I seriously want to fix this. I looked at fstab and mtab, but I can't understand it. This is how they looks like.

This is /etc/fstab

/dev/hda7 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda5 /home ext3 defaults 1 2
none /mnt/cdrom supermount dev=/dev/scd0,fs=udf:iso9660,ro,--,iocharset=iso8859-1 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,sync,umask=0,codepage=850,iocharset=iso8859-1 0 0
/dev/hda1 /mnt/win_c ntfs umask=0,ro,iocharset=iso8859-1 0 0
/dev/hda2 /mnt/win_d vfat umask=0,codepage=850,iocharset=iso8859-1 0 0
none /proc proc defaults 0 0
/dev/hdb1 /second vfat defaults 1 1
/dev/hda6 swap swap defaults 0 0



And this is /etc/mtab

/dev/ide/host0/bus0/target0/lun0/part7 / ext3 rw 0 0
none /proc proc rw 0 0
none /proc/bus/usb usbfs rw 0 0
none /dev devfs rw 0 0
none /dev/pts devpts rw,mode=0620 0 0
/dev/ide/host0/bus0/target0/lun0/part5 /home ext3 rw 0 0
none /mnt/cdrom supermount ro,dev=/dev/scd0,fs=udf:iso9660,--,iocharset=iso8859-1 0 0
none /mnt/floppy supermount rw,sync,dev=/dev/fd0,fs=ext2:vfat,--,umask=0,codepage=850,iocharset=iso8859-1 0 0
/dev/ide/host0/bus0/target0/lun0/part1 /mnt/win_c ntfs ro,umask=0,iocharset=iso8859-1 0 0
/dev/ide/host0/bus0/target0/lun0/part2 /mnt/win_d vfat rw,umask=0,codepage=850,iocharset=iso8859-1 0 0
/dev/ide/host0/bus0/target1/lun0/part1 /second vfat rw 0 0



Do I have to change something here? or is it something else? I'm using Mandrake 9.2

btw When I try with MandrakeMove, everything is perfect.
 
Old 01-27-2004, 07:02 PM   #2
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
Is partition that you are having trouble with /dev/hdb1. It is vfat there is no user/group user info stored in that file system. Allow user access to it you need to force the group to users (gid=100).
Modify /etc/fstab
/dev/hdb1 /second vfat gid=100 1 1
 
Old 01-27-2004, 07:35 PM   #3
Nukem
Member
 
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373

Original Poster
Rep: Reputation: 30
Yes the device that I'm having trouble with is hdb1. I changed fstab as what you said, but it had no effect. The problem still remains the same.
 
Old 01-27-2004, 07:38 PM   #4
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
After you changed the /etc/fstab did you remount the filesystem?
 
Old 01-27-2004, 07:40 PM   #5
Nukem
Member
 
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373

Original Poster
Rep: Reputation: 30
How do I remount?
This is what I did. I loged in as root, changed the file, then loged out and loged back in as a normal user.

edited: I just rebooted and no change.

Last edited by Nukem; 01-27-2004 at 07:46 PM.
 
Old 01-27-2004, 08:22 PM   #6
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Make sure the filesystem is unmounted first then simply

chmod 777 /second

ie chmod the mount point

or add a umask value to the 4th field

umask=000

/dev/hdb1 /second vfat umask=000,defaults 0 0

Also change the dump and fsck to zero (5th and 6th fields) - you dont need to check vfat or use dump to back it up.

Last edited by Skyline; 01-27-2004 at 08:33 PM.
 
Old 01-27-2004, 09:09 PM   #7
Nukem
Member
 
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Skyline
add a umask value to the 4th field

umask=000

/dev/hdb1 /second vfat umask=000,defaults 0 0

Also change the dump and fsck to zero (5th and 6th fields) - you dont need to check vfat or use dump to back it up.

That was amazing... the above method worked perfectly..... The problem is now solved. Thanks everyone for helping.

I just tried copying and pasting this line "/dev/hdb1 /second vfat umask=000,defaults 0 0" where the old one used to be..

btw I wonder what does the umask=000 does...

Last edited by Nukem; 01-27-2004 at 09:11 PM.
 
Old 01-27-2004, 09:22 PM   #8
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Quote:
That was amazing... the above method worked perfectly..... The problem is now solved
Good to see its now working Nukem - regards umask, think of it as a "filter" of permissions, sort of "opposite" of chmod - on Linux filesystems it can be used to set default permissions for all new files and directories created.
 
Old 01-28-2004, 08:03 AM   #9
Nukem
Member
 
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373

Original Poster
Rep: Reputation: 30
Ohh thanks...
 
  


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
External USB hard disk wont allow user to write, vfat FS scm86 Linux - Hardware 3 09-06-2005 02:05 AM
Allowing normal users read-write access to Windows partitions Aphex_Twin2 Slackware 5 05-23-2005 10:22 AM
New reiser partition. How can normal user write on it? pepeq Linux - Hardware 5 12-09-2004 07:20 PM
How can I do an automated Read/Write SMB mount for a normal user? molear Linux - Newbie 1 07-01-2004 03:45 PM
how can a normal user write into /mnt/win kevinqian Linux - General 1 10-31-2003 09:27 PM

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

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