PDA

View Full Version : Unable to read mounted drive



squeegy
12-09-2003, 09:14 PM
I recently installed Knoppix to my hard drive and was wanting to access one of my Windows disks. Everything mounts properly but I cannot read any information from it using my default user (squeegy). I thought I might need to add squeegy to the disk group, but that did not work either. I have tried to chown squeegy:squeegy /mnt/hdb1 but it still remains root:root

I am sure this is something fairly simple, I just can't find anything when I search for it.

Thanks
Michael

Markus
12-09-2003, 10:04 PM
Hi,

Try modifying your /etc/fstab and add uid & gid on your windows disk.
My windows ntfs line looks like:

/dev/hda1 /mnt/hda1 ntfs noauto,users,exec,ro,uid=myuserlogin,gid=myuserlog in 0 0

squeegy
12-10-2003, 01:05 AM
Nope that didn't do anything different. If it makes any difference I also just noticed that prior to mounting /dev/hdb1 under /mnt/hdb1, that /mnt/hdb1 initially has the ability for group read, etc. then it is as soon as I mount the drive only the user can access the file, the group permissions disappear.

bxb32001
12-11-2003, 05:53 AM
Do you mount the drives using the icons on the desktop? Well, if you do it that way, it gets mounted as read only.

If you do it from the terminal though (or the run command box), you'd be fine. You won't see the desktop icons light up though. If you want to browse it through Konqueror, just open up Konqueror and browse to /mnt/hdx.

Or you can type konqueror /mnt/hdx on the terminal.

squeegy
12-11-2003, 06:39 AM
No I'm not mounting from the desktop I no longer even have those icons. I am only mounting from console. I understand that it will mount readonly. I can't even get permission to read it unless I am root.

bxb32001
12-11-2003, 07:23 AM
Hmmm.... wierd to me as I've never had this problem.

I suggest you post your fstab so our gurus here can have a stab at it.

squeegy
12-11-2003, 07:32 AM
# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/hda2 / ext3 defaults,errors=remount-ro 0 1
/dev/hda3 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy vfat defaults,user,noauto,showexec,umask=022 0 0
/dev/cdrom /cdrom iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/dvd /dvd iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/cdaudio /cdaudio iso9660 defaults,ro,user,noexec,noauto 0 0
# Added by KNOPPIX
/dev/hdc5 /mnt/hdc5 ntfs noauto,users,exec,ro,umask=000 0 0
# Added by KNOPPIX
/dev/hda1 /mnt/hda1 ntfs noauto,users,exec,ro,umask=000 0 0
# Added by KNOPPIX
/dev/hdb1 /mnt/hdb1 ntfs noauto,users,exec,ro,umask=000 0 0

bxb32001
12-11-2003, 08:11 AM
I'm no expert here but how about removing the 'ro' and changing it to 'rw'?

Markus
12-11-2003, 03:22 PM
I wouldn't give write rights to ntfs disks, you could screw up the file system if you wrote.

Sorry if obvious, but you did substitute in my earlier post myuserlogin for squeegy?

Try doing as root:
cd /dev
chmod 555 hda1 (same for hdc5 and hdb1)

squeegy
12-11-2003, 05:20 PM
I am not trying to get write access first of all, so changing it to rw would do nothing. I can't read the drive when I am any other user than root. I tried adding uid=squeegy it still responded the same. Tried cd /dev then chmod 555 hdb1 still nothing.

squeegy@mars:~$ cd /mnt/hdb1
bash: cd: /mnt/hdb1: Permission denied

squeegy
12-11-2003, 05:22 PM
Just noticed that I could access the cdrom drive as squeegy when it was mounted, trying to find any similarities.

squeegy
12-11-2003, 05:32 PM
root@mars:/mnt# ls -la
total 44
drwxr-xr-x 12 root root 4096 Dec 10 12:44 .
drwxr-xr-x 24 root root 4096 Dec 9 13:00 ..
drwxr-xr-x 2 root root 4096 Aug 18 2002 auto
drwxr-xr-x 2 root root 4096 Oct 4 14:18 bootfloppy
drwxr-xr-x 2 root root 4096 Dec 9 08:10 cdrom
lrwxrwxrwx 1 root root 16 Dec 9 07:08 floppy -> /mnt/auto/floppy
drwx------ 1 root root 8192 Dec 10 18:16 hda1
drwxr-xr-x 2 root root 4096 Dec 9 07:23 hdb1
drwxr-xr-x 2 root root 4096 Dec 9 07:23 hdc5
drwxr-xr-x 2 root root 4096 Dec 10 12:44 jupiter
drwxr-xr-x 2 root root 4096 Oct 4 14:19 miniroot
drwxr-xr-x 2 root root 4096 May 30 2001 test
drwxr-xr-x 2 root root 4096 Dec 9 07:31 wind

this is what it looks like when hda1 IS mounted. and hdb1 is not. It contains the correct mode or whatever, so that other users can read it. Then as soon as I mount the drive it looks like this.

drwxr-xr-x 12 root root 4096 Dec 10 12:44 .
drwxr-xr-x 24 root root 4096 Dec 9 13:00 ..
drwxr-xr-x 2 root root 4096 Aug 18 2002 auto
drwxr-xr-x 2 root root 4096 Oct 4 14:18 bootfloppy
drwxr-xr-x 2 root root 4096 Dec 9 08:10 cdrom
lrwxrwxrwx 1 root root 16 Dec 9 07:08 floppy -> /mnt/auto/floppy
drwx------ 1 root root 8192 Dec 10 18:16 hda1
drwx------ 1 root root 114688 Dec 10 18:46 hdb1
drwxr-xr-x 2 root root 4096 Dec 9 07:23 hdc5
drwxr-xr-x 2 root root 4096 Dec 10 12:44 jupiter
drwxr-xr-x 2 root root 4096 Oct 4 14:19 miniroot
drwxr-xr-x 2 root root 4096 May 30 2001 test
drwxr-xr-x 2 root root 4096 Dec 9 07:31 wind

As you can see the drives that are mounted lose their access permissions ? But like I said the cdrom is readable by squeegy when mounted.

squeegy
12-11-2003, 05:37 PM
alright now I have added the line umask=555 which when i mount the drive it now comes up with these permissions.

squeegy@mars:/mnt$ ls -la
total 38
drwxr-xr-x 12 root root 4096 Dec 10 12:44 .
drwxr-xr-x 24 root root 4096 Dec 9 13:00 ..
drwxr-xr-x 2 root root 4096 Aug 18 2002 auto
drwxr-xr-x 2 root root 4096 Oct 4 14:18 bootfloppy
dr-xr-xr-x 1 root root 2048 Dec 31 1969 cdrom
lrwxrwxrwx 1 root root 16 Dec 9 07:08 floppy -> /mnt/auto/floppy
drwx------ 1 root root 8192 Dec 10 18:16 hda1
drwx-w-r-- 1 root root 114688 Dec 10 18:46 hdb1
drwxr-xr-x 2 root root 4096 Dec 9 07:23 hdc5
drwxr-xr-x 2 root root 4096 Dec 10 12:44 jupiter
drwxr-xr-x 2 root root 4096 Oct 4 14:19 miniroot
drwxr-xr-x 2 root root 4096 May 30 2001 test
drwxr-xr-x 2 root root 4096 Dec 9 07:31 wind


I just think it needs a little more tweaking and it'll be there. What umask should i use ?

squeegy
12-12-2003, 12:22 AM
alright i finally got it to work, had to add uid=1000,gid=1000,umask=555 and it works now. thanks for all the suggestions.