LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   mounting usb external harddrive (https://www.linuxquestions.org/questions/linux-hardware-18/mounting-usb-external-harddrive-637532/)

jsteegh 04-24-2008 09:00 AM

mounting usb external harddrive
 
Hello,

I've got a permission problem with my usb external hd.

The usb harddrive is a 320 gb one and I partitioned 100 gb in vfat and the rest in ext3 with the suse partioner. When I connect the usb harddrive both partitions are automounted and both are excessible. However one (the vfat partition) is mounted as the normal user and the other (the ext3 partition) is mounted as root. And the problem is ofcourse that I can't do anything in the ext3 partition because it is mounted as root.

How can I solve this problem. By the way this problem occurs on all my linux systems, so I don't think the problem lies with the way the usb drive is mounted. I think it has to do with the way the partition is partitioned (fstab etc). But I don't know how to solve it.

Thanks.
Justin

biophysics 04-24-2008 09:14 AM

After it is mounted as root open a terminal

$ df -h

try to find the mount point of ext3 (should be approx. (320 - 100 = 220 GB)
Assume it is /media/disk1
Now login as root:

$ chown -R user_name:user_group /media/disk1

Now unmount it and remove/unplug the usb disk.

In future, user_name can write in the disk/ext3

jsteegh 04-24-2008 01:12 PM

Thank you,

It works perfectly.

Only one more question. How would I solve this when I wouldn't have the root passwd? For instance when I would use the usb drive at school?

Could the problem have something to do with the way the drive is partitioned?

Thanks,
Justin

biophysics 04-25-2008 02:15 PM

A bit complicated.

You should have the same user id and group id in your home pc as it is your school. (I mean user id not username)

In school:
$ id

note the details and change the same in your home PC.


All times are GMT -5. The time now is 12:12 AM.