Click to See Complete Forum and Search --> : accessing my second hard drive


z9_87
12-17-2004, 10:27 PM
Linux newb here. I have sucessfully mounted my second hard drive and under the terminal I can read what is on it, but as a common user I cannot access the /mnt/hdb1 (the dir I mounted the hdd to).

I am running mdk 10.1.

some more information: I have tried changing the access rights (using chgrp -R username (while root))for the directory /mnt/hdb1 but I always get "operation not permitted".

DSwain
12-17-2004, 11:30 PM
What file system type is it? If it's NTFS it's because it only supports read-only access from a Linux standpoint. In this case you'll need to do some more work to get it so you can write onto it. I'm not sure exactly what the steps you would need to take in MDK to get this going though.

z9_87
12-17-2004, 11:42 PM
it's fat32. If i need to reformat and partition it using a linux filesystem that's ok, but i need to be able to get my current files off there first. Is there a way to log on as root not under the terminal? So i could access the hdd and move all files to my master HDD?

hard candy
12-17-2004, 11:46 PM
You can also look in the /etc/fstab file and see what the permissions for that hard drive are configured as, i.e if it is set to defaults, then perhaps if you add the user to the disk or the sys group, they may be able to read it.

z9_87
12-18-2004, 12:06 AM
How would I do that? I was messing with fstab earlier but I couldn't figure out anything to make it work. Right now my line for my 2nd hdd is /dev/hdb1 /mnt/hdb1 vfat defaults 0 0 obviously defaults. What do i need to change it to?

DSwain
12-18-2004, 01:18 AM
Change defaults to rw. That should set it so you can read and write from it.

z9_87
12-18-2004, 01:31 AM
no that didn't work. DO i have to reboot or something? I changed it to /dev/hdb1 /mnt/hdb1 vfat rw 0 0
and still no permissions

DSwain
12-18-2004, 10:05 AM
Yes you would have to reboot, so it could remount the partitions again and then they *should* and hopefully work.

plainzwalker
12-18-2004, 11:42 AM
Make sure you add users so it looks kinda like this

/dev/sda1 /home/dantrag/usb-drive auto noauto,rw,users,noatime 0 0

(Thats for a usb hd, but it should still work)
This allows my normal user access to the dir, also helps if the user has writes to the dir that its mounted at.


Jeff

retsaw
12-18-2004, 12:26 PM
No you don't have to reboot. What you want in your /etc/fstab is "users,umask=000" instead of defaults "rw" is set by default anyway so you don't need to specify it. Once you make that change you should be able to mount and access it from any users account. You will have to unmount it (probably as root) first, then you can mount it again and should be able to access it without problem.

Pafnoutios
12-18-2004, 03:04 PM
If you want to access the drive all the time as a permanent drive, you probably don't want 'noauto' in the fstab options column. That would prevent it from being mounted on bootup.

nuttron
12-18-2004, 06:14 PM
here is the line in my fstab for the win partition ;i had to reboot after editing it :

/dev/hda1 /fat-c vfat users,defaults,umask=000 0 0

z9_87
12-18-2004, 11:45 PM
ok none of these worked. What exactly should I enter into fstab. My HD is called hdb1 and the directory i want to mount it to is /mnt/mnt1 I want to be able to read and write to it from any user.

I tried plainzwaler's but making changes to fit my situation:
/dev/hdb1 /mnt/hbd1 vfat noauto,rw,users,noatime 0 0

then i tried that with auto instead of noauto.

then i tried:
/dev/hdb1 /mnt/hbd1 vfat auto,defaults,users,unmask=000,noatime 0 0

and then finally nuttron's:
/dev/hdb1 /mnt/hdb1 vfat users,defaults,umask=000 0 0
and that one gave me a bunch of errors when i tried to open it.

also another question, do I need anything in mtab?

I added a line ot mtab: "/dev/hdb1 /mnt/hdb1 vfat users,rw 0 0" and now it lets me open /mnt/hdb1 without any errors about accesss rights. However I cannot see any files in the directory. How can I now see the files?

z9_87
12-19-2004, 12:18 AM
ok on a side note i hope and dont think this has anything to do with the hdd mounting and accessability, but I'm gettiing "Mutex destroy failure: Device or resource busy" when running as root in the Konsole. Any ideas as to what that is? I've googled and only found nothing but people that are asking for help to fix it.

z9_87
12-19-2004, 09:15 PM
ok ,all i said above can be discarded.

I copied the files to my xp machine and formatted using ext2. Entered this into fstab: /dev/hdb1 /home/z9_87/D ext2 auto,iocharset=utf8,uid=501,umask=022 0 0 and it works for reading and writing to it, but it does not mount on startup. The auto in the first part of the options? should make it mount on start-up right? Secondly this lets me read and write but not delete. what do i need to add to get delete access?

acid45
12-20-2004, 04:01 AM
I was just peeking at your post and I thought this might help

http://www.die.net/doc/linux/man/man5/fstab.5.html

z9_87
12-21-2004, 01:33 AM
yeah i read the man page on it. I just need to find out how to auto mount it on startup and have delete access now.