Discussion:
can't map uid:gid in NFS.
Christiano Farina Haesbaert
2008-11-02 04:51:15 UTC
Permalink
Hello there I'm having trouble in mapping uid:gid in an openbsd box.
Here is the the setup:
openbsd(192.168.8.3) as nfs-server, wanting to export
/home/haesbaert/Projects/magt
to a linux box, the owner of the directory in the server is haesbaert:users
(1000:10).

In the linux box (192.168.8.1) the user trying to access is 1201:512.

I can mount the export in linux, but the mappings don't seem to change. And
yes I'm
HUPing mountd, I've also tryied to start mountd with -d, no errors shown.

Here is my /etc/exports:
/home/haesbaert/Projects/magt -mapall=1000:10 192.168.8.1

Here is mountd debug:
Got line /home/haesbaert/Projects/magt -mapall=1000:10 192.168.8.1
Making new ep fs=0x7,0xcb85933
doing opt -mapall=1000:10 192.168.8.1
got host 192.168.8.1
exporting /home/haesbaert/Projects/magt
unexporting / /
unexporting /home /home
unexporting /tmp /tmp
unexporting /usr /usr
unexporting /var /var
Getting mount list.
Here we go.
Got mount request from 192.168.8.1
rpcpath: /home/haesbaert/Projects/magt
Mount successful for /home/haesbaert/Projects/magt by 192.168.8.1.

Using Openbsd 4.4.

Am I missing something ? (I've tryied mapping to any other uid, still it
doesn't change).
In the linux box all files appear as 1000:10, but I have no permission to
write in it, as if no map were in place.
Following in linux box:
drwxr-xr-x 6 1000 wheel 512 Nov 2 02:20 devel_magt
[***@descartes ~]$ touch devel_magt/test
touch: cannot touch `devel_magt/test': Permission denied

Any clue ?
Christiano Farina Haesbaert
2008-11-02 22:28:58 UTC
Permalink
I found out, my home was being mounted with the "nosuid" option.

I believe would be sabe to have some comment refering to this situation in
the exports manpage,
don't know if it is me but it took me the weekend to figure it out.

Thanks to Jan Stary for the attention.
Post by Christiano Farina Haesbaert
Hello there I'm having trouble in mapping uid:gid in an openbsd box.
openbsd(192.168.8.3) as nfs-server, wanting to export
/home/haesbaert/Projects/magt
to a linux box, the owner of the directory in the server is haesbaert:users
(1000:10).
In the linux box (192.168.8.1) the user trying to access is 1201:512.
I can mount the export in linux, but the mappings don't seem to change. And
yes I'm
HUPing mountd, I've also tryied to start mountd with -d, no errors shown.
/home/haesbaert/Projects/magt -mapall=1000:10 192.168.8.1
Got line /home/haesbaert/Projects/magt -mapall=1000:10 192.168.8.1
Making new ep fs=0x7,0xcb85933
doing opt -mapall=1000:10 192.168.8.1
got host 192.168.8.1
exporting /home/haesbaert/Projects/magt
unexporting / /
unexporting /home /home
unexporting /tmp /tmp
unexporting /usr /usr
unexporting /var /var
Getting mount list.
Here we go.
Got mount request from 192.168.8.1
rpcpath: /home/haesbaert/Projects/magt
Mount successful for /home/haesbaert/Projects/magt by 192.168.8.1.
Using Openbsd 4.4.
Am I missing something ? (I've tryied mapping to any other uid, still it
doesn't change).
In the linux box all files appear as 1000:10, but I have no permission to
write in it, as if no map were in place.
drwxr-xr-x 6 1000 wheel 512 Nov 2 02:20 devel_magt
touch: cannot touch `devel_magt/test': Permission denied
Any clue ?
Loading...