Divan Santana <di...@santanas.co.za> writes:

>>> I would expert my NFS client uid 67 to be mapped to the remote NFS
>>> server and presented as 1000 therefore permission should be granted to
>>> write?
>>
>> Did you forget to send SIGHUP to mountd(8) to make it re-read
>> exports(5)?
>
> I did do a reload of mountd.  I also rebooted.
>
> It seems this is supposed to work the way I described.  So let me give
> it another try.

OK issue is kind of resolved.  Though not in an ideal way.

The issue is this, I had two exports which seem to conflict and cause an issue:

If my exports is like so:

/etc/exports
# the data on server under /data/nextcloud is 67:67 . the client is also 67:67
/data/nextcloud -alldirs -network=192.168.1.252 -mask=255.255.255.255
# the data under /data/media is 1000:1000 the client is 67:67
/data/media -mapall=1000:1000 -alldirs -network=192.168.1.252 
-mask=255.255.255.255

Then I can't write to /data/media from 1.252 from uid:gid 67:67 as 1000:1000 as 
the first
entry seems to take precedence over the latter.

If I swap the two entries, then I can write to /data/media from client
uid 67:67 as 1000:1000.  However then the second entry breaks.

How can one get both entries to work?

One way I have done it, is by doing this:

# on the server, (I don't care if the files sit as 1000:1000 on the server)
chown -R 1000.1000 /data/nextcloud/

then -mapall=1000:1000 for both entries, then there is no conflict and
both work.

/etc/exports
# the data on server under /data/nextcloud is 67:67 . the client is also 67:67
/data/nextcloud -mapall=1000:1000 -alldirs -network=192.168.1.252 
-mask=255.255.255.255
# the data under /data/media is 1000:1000 the client is 67:67
/data/media -mapall=1000:1000 -alldirs -network=192.168.1.252 
-mask=255.255.255.255

Reply via email to