Click to See Complete Forum and Search --> : NSF Permission Problem


gkedrovs
11-24-2003, 08:50 PM
I have nfs working for automatically mounted file systems on my server (e.g. /home/*), but for other file systems no.

Example: An internal Zip250 on my server. How do I configure this to be useable via nfs?

Here is my /etc/exports entry on the server:
/mnt/zip 192.168.0.0/255.255.255.0(sync,rw)

Here is my /etc/fstab entry on the client:
server:/mnt/zip /mnt/nfs_zip250 nfs noauto,user,rw,rsize=8192,wsize=8192,hard,intr,nol ock 0 0

When I do a mount /mnt/nsf_zip250 I get:
mount: server:/mnt/zip failed, reason given by server: Permission denied

I changed UIDs and GIDs to match on both server and client (in /etc/passwd).

Is there a special deal with nfs and these kind of drives? I'm also having problems with a cdrom mounting, but that will be for later.

-Greg

swiftnet
11-25-2003, 05:55 PM
I never used removable drives via NFS - Have you tried your account at the server to mount the drives? If yes and it works, can you connect to the drive via NFS now that it is mounted?

gkedrovs
11-25-2003, 09:13 PM
Originally posted by swiftnet I never used removable drives via NFS

Yeah, and maybe that's my problem: trying to be too tricky. ??

Originally posted by swiftnet Have you tried your account at the server to mount the drives? If yes and it works, can you connect to the drive via NFS now that it is mounted?

Yeah. I can mount the cdrom and the zip drive fine as user "greg" on the server (ssh connection in term window from my desktop). No problems, but something weird:

Here are the entries for the 2 drives on my server, /etc/fstab:
/dev/cdrom /mnt/cdrom iso9660 noauto,user,ro 0 0
/dev/hdb4 /mnt/zip auto noauto,user 0 0

I mount them as user "greg" (UID: 500) via ssh and do an ls -l. Here's what shows up:
drwxr-xr-x 7 root root 4096 Sep 25 08:16 cdrom/
drwxr--r-- 3 greg users 16384 Dec 31 1969 zip/

Why would the cdrom be owned by root when I (greg) mounted it? The zip shows up logically: mounted by greg, owned by greg.

And that's not the end of the weirdness. Here is the server's /etc/exports:
/home/greg 192.168.0.100(rw,sync)
/mnt/cdrom 192.168.0.0/255.255.255.0(ro,sync)
/mnt/zip 192.168.0.0/255.255.255.0(rw,sync)

And here is the desktop fstab:
server:/home/greg /mnt/nfs_greg nfs noauto,user 0 0
server:/mnt/zip /mnt/nfs_zip nfs noauto,user 0 0
server:/mnt/cdrom /mnt/nfs_cdrom nfs noauto,user,ro 0 0

I can mount /home/greg fine. I can mount /mnt/cdrom fine (even when it's owned by root over on the server?!). But, when I try to mount /mnt/zip (owned by greg over on the server), it gives me this error:

mount: server:/mnt/zip failed, reason given by server: Permission denied

Why would it give me a Permission denied failure? I own it - same name (greg) and same UID (500)? And why would it not deny me access to the cdrom when it, apparently, is owned by root (UID: 0, if I'm not mistaken).

Okay, one more for the Twighlight Zone: I did a mount over on the server and this showed up:
/dev/hdc on /mnt/cdrom type iso9660 (ro,noexec,nosuid,nodev,user=greg)
/dev/hdb4 on /mnt/zip type umsdos (rw,noexec,nosuid,nodev,user=greg)

Apparently, I do own the cdrom mount (regardless of what ls says). And the zip was mounted ("auto" in fstab) as "umsdos"?? Could that have something to do with the Permission failure? They are Zip disks formated in Win98SE. I can read them fine on the server with ls in the mounted drive.

FWIW: I did an exportfs -ar after mounting the drives (cdrom and zip).

I tried playing all day today with autofs to get this thing to work... I'm about braindead with all this.

Thanks for the post. At least I got some moral support here. :-)

-Greg