LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NFS file permissions (https://www.linuxquestions.org/questions/linux-networking-3/nfs-file-permissions-218774/)

pembo13 08-17-2004 10:15 AM

NFS file permissions
 
Hello,

Is it possible to have n ftp type situation with NFS where by I can mount an NTF share and write to it, but it gets written on the server end as a diff. user. Just as file in ftp get wriitten as the user you logged into the ftp server as.

Please advise
Thank you.

Donboy 08-17-2004 10:32 AM

Yes, you do it like this...

Quote:

cat /etc/exports

/mnt/whatever 192.168.0.0/24(map_static=/etc/users.map)
Quote:

cat /etc/users.map

# Mapping for client foobar:
# remote local
uid 0-99 - # squash these
uid 100-500 1000 # map 100-500 to 1000-1500
gid 0-49 - # squash these
gid 50-100 700 # map 50-100 to 700-750
So basically you are mapping one uid to another across systems.

Hope that helps.

pembo13 08-17-2004 04:41 PM

I did what you suggested, googled up on it and all.

But I get this error:
Quote:

exportfs: /etc/exports:1: unknown keyword "map_static=/etc/foo.map"

Donboy 08-17-2004 08:57 PM

Hmmm, perhaps the version of NFS you have installed isn't current enough to support the use of that keyword?

Maybe you need to download and install a newer NFS on your system. Since you're using RH/Fedora, just do...

yum update nfs-utils

Also perhaps copy and paste your /etc/exports here to be sure there are no syntax errors.

Otherwise I can't imagine why it wouldn't work.

pembo13 08-17-2004 11:12 PM

Well, I'm using FC2, and I just recently Yumi'ed everythign to an updated version. I have nfs-utils-1.0.6-22.

Here's the contents of my /etc/exports
Code:

/var/websites            192.168.100.11(rw,sync,map_static=/etc/exports_adminweb.map)

Donboy 08-18-2004 11:43 AM

Hmm, well something is certainly wrong. I looked all over Google to find a solution for this, but couldn't find much of anything about it. I know I have done this done before on RH, so I think perhaps something is broken.

I looked around Bugzilla and found a bug report about this EXACT problem with RH7, but that's been a couple of years ago and has long since been fixed. Unfortunately I have never done it with Fedora, so maybe it's broken again.

I have opened a bug report at Bugzilla.

https://bugzilla.redhat.com/bugzilla....cgi?id=130261

Feel free to add a comment letting them know you are showing similar results with FC2.

pembo13 08-18-2004 01:14 PM

Ah. Yah I googled alot myself. Google did not return many hits. I also came up on the bug report on RH7. I was waiting for word from you before I filed a bug report myself.

Thanks for your help.

Gkarfield 08-18-2004 02:40 PM

I have Suse 9.1 , it has samba, and smbmount, I use uid=<current machine (local)> in smbmount command. so the machine can have file access . the root have access by default, as he does the mount.

may that helps (we have no the same distro but.........)


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