LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Cant read/write to second hard disk under normal user (https://www.linuxquestions.org/questions/linux-general-1/cant-read-write-to-second-hard-disk-under-normal-user-139341/)

Nukem 01-27-2004 04:13 PM

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.

g-rod 01-27-2004 06:02 PM

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

Nukem 01-27-2004 06:35 PM

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.

g-rod 01-27-2004 06:38 PM

After you changed the /etc/fstab did you remount the filesystem?

Nukem 01-27-2004 06:40 PM

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.

Skyline 01-27-2004 07:22 PM

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.

Nukem 01-27-2004 08:09 PM

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. :D

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...

Skyline 01-27-2004 08:22 PM

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.

Nukem 01-28-2004 07:03 AM

Ohh thanks...


All times are GMT -5. The time now is 06:50 PM.