You are not logged in.

#1 2012-01-16 18:57:02

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

[SOLVED] yet another nfs problem.. cannot write/delete on nfs share.

so.. i used my own user to run the nfs-server (as in "set it in the idmap.conf file)

my /etc/exports file form the server:

# /etc/exports
#
# List of directories exported to NFS clients.  See exports(5).
# Use exportfs -arv to reread.
#
# Example for NFSv2 and NFSv3:
#  /srv/home       hostname1(rw,sync) hostname2(ro,sync)
#
# Example for NFSv4:
#  /srv/nfs4       hostname1(rw,sync,fsid=0)
#  /srv/nfs4/home   hostname1(rw,sync,nohide)
# Using Kerberos and integrity checking:
#  /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt)
#  /srv/nfs4/home   gss/krb5i(rw,sync,nohide)
#
/mnt/raid1/ 192.168.1.13/255.255.255.0(rw,async,no_subtree_check,all_squash)
/mnt/raid1/Images 192.168.1.14/255.255.255.0(ro,async,no_subtree_check)
/mnt/raid1/Audio 192.168.1.14/255.255.255.0(ro,async,no_subtree_check)
/mnt/raid1/Video/Series 192.168.1.14/255.255.255.0(ro,async,no_subtree_check)

of course i am connecting from the rw export (192.168.1.13)


my idmap.conf:

[General]

Verbosity = 0
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = freebox

[Mapping]

Nobody-User = carnager
Nobody-Group = users

[Translation]

Method = nsswitch

this file exists on both server and client.


Now the strange part:

➜  Agalloch  whoami
carnager
➜  Agalloch  ls -l .
total 4
drwxr-xr-x 2 carnager users 4096 Nov 15  2009 2008 The White EP
➜  Agalloch  mkdir bla
mkdir: cannot create directory `bla': Permission denied

this is executed from the client.

Last edited by Rasi (2012-01-17 20:48:10)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#2 2012-01-16 19:42:29

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] yet another nfs problem.. cannot write/delete on nfs share.

Your NFS root does say rw, but all your exports say ro. If this is NFS v4, then the top export is just the export root, no more. I believe the idmap stuff is NFs v4 only, so I'll assume this is indeed NFS v4. Of course, since you do not show your client fstab, we can only guess which shares are mounted - leaving us with a lot of assumptions and few hard facts smile.

Last edited by .:B:. (2012-01-16 19:43:19)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2012-01-16 19:51:40

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED] yet another nfs problem.. cannot write/delete on nfs share.

Doesn't NFSv4 require the root export to be fsid=0 though?

On the other hand, I don't get the way the hosts are laid out so this is probably over my head to begin with.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#4 2012-01-16 19:52:42

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] yet another nfs problem.. cannot write/delete on nfs share.

True, I believe it does. Can't check my own NFS v4 setup, not at home atm.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2012-01-16 19:54:26

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] yet another nfs problem.. cannot write/delete on nfs share.

.:B:. wrote:

Your NFS root does say rw, but all your exports say ro. If this is NFS v4, then the top export is just the export root, no more. I believe the idmap stuff is NFs v4 only, so I'll assume this is indeed NFS v4. Of course, since you do not show your client fstab, we can only guess which shares are mounted - leaving us with a lot of assumptions and few hard facts smile.

You are wrong. the ro exports are for a different host. i said explicitly i connect from host 192.168.1.13 in my original post.

anyway: here the fstab of my client:
192.168.1.100:/mnt/raid1 /mnt/nas nfs rw,rsize=32768,wsize=32768 0 0

Last edited by Rasi (2012-01-16 19:57:15)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#6 2012-01-16 21:59:19

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] yet another nfs problem.. cannot write/delete on nfs share.

I did overlook that indeed, it seems.

I believe you should be checking permissions on /mnt/nas, not on its subdirs.

As for your notation - as a side note - why are you specifing a host mask? You could just use 192.168.1. instead. First you restrict it to one IP, but the hostmask effectively undoes that (which is, after all, why you can connect from 192.168.1.100...).

Last edited by .:B:. (2012-01-16 21:59:51)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#7 2012-01-17 20:40:37

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] yet another nfs problem.. cannot write/delete on nfs share.

.:B:. wrote:

I did overlook that indeed, it seems.
As for your notation - as a side note - why are you specifing a host mask? You could just use 192.168.1. instead. First you restrict it to one IP, but the hostmask effectively undoes that (which is, after all, why you can connect from 192.168.1.100...).

ehm... 192.168.1.100 IS the share.
192.168.1.13 is my desktop.
And 192.168.1.13 is my wifes netbook - which should be ro only.


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#8 2012-01-17 20:41:25

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] yet another nfs problem.. cannot write/delete on nfs share.

[carnager@archnas ~]$ ls -l /mnt/
total 4
drwxr-xr-x 9 carnager users 4096 Jan  8 16:28 raid1
[carnager@archnas ~]$ ls -l /mnt/raid1/
total 36
drwxr-xr-x 4 carnager users  4096 Dec 19 12:58 Audio
drwxr-xr-x 4 carnager users  4096 Dec 22 14:38 Downloads
drwxr-xr-x 4 carnager users  4096 Dec 18 14:59 Games
drwxr-xr-x 4 carnager users  4096 Dec 18 14:55 Images
drwx------ 2 carnager users 16384 Dec 16 23:55 lost+found
drwxr-xr-x 8 carnager users  4096 Jan 16 18:36 Video

this looks all fine.. i am totally out of ideas...



and just to point out one more possible mistake: the UID of user "carnager" is the same on both machines (server/client)

Last edited by Rasi (2012-01-17 20:42:32)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#9 2012-01-17 20:47:57

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] yet another nfs problem.. cannot write/delete on nfs share.

bla... i solved it. the export for 192.168.1.13 contained the "all_squash" option.
I removed it and everything works again.


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

Board footer

Powered by FluxBB