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 |
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-27-2004, 05:13 PM
|
#1
|
Member
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373
Rep:
|
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.
|
|
|
01-27-2004, 07:02 PM
|
#2
|
Member
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336
Rep:
|
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
|
|
|
01-27-2004, 07:35 PM
|
#3
|
Member
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373
Original Poster
Rep:
|
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.
|
|
|
01-27-2004, 07:38 PM
|
#4
|
Member
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336
Rep:
|
After you changed the /etc/fstab did you remount the filesystem?
|
|
|
01-27-2004, 07:40 PM
|
#5
|
Member
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373
Original Poster
Rep:
|
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.
|
|
|
01-27-2004, 08:22 PM
|
#6
|
Senior Member
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104
Rep:
|
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.
|
|
|
01-27-2004, 09:09 PM
|
#7
|
Member
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373
Original Poster
Rep:
|
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.
|
|
|
01-27-2004, 09:22 PM
|
#8
|
Senior Member
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104
Rep:
|
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.
|
|
|
01-28-2004, 08:03 AM
|
#9
|
Member
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373
Original Poster
Rep:
|
Ohh thanks...
|
|
|
All times are GMT -5. The time now is 10:05 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
|
|