On 2019-12-10 11:22, Cameron Simpson wrote:
On 10Dec2019 07:55, Ed Greshko <ed.greshko(a)greshko.com> wrote:
> On 2019-12-10 07:21, Cameron Simpson wrote:
>> On 09Dec2019 18:05, Bob Goodwin <bobgoodwin(a)fastmail.us> wrote:
>>> My NFS server works fine but not as a user other than root and I have not
been able to change that. I suspect this is not an uncommon problem and hope that someone
can tell me how to fix it?
>>
>> Are you saying that on a _client_ machine, users who are not root cannot browse
the mounted NFS tree?
>>
>> If so, the first thing to come to mind is that traditionally, the underlying
mount directory permissions govern access to the top of the mount. So:
>>
>> - umount the NFS share
>> - look at the perms on the mount point; are they root only?
>> - try: chmod 755 /the/mount/point
>> - remount the NFS share and retest
>>
>
> That isn't quite what he'd want.
Do we know what Bob wants? It sounds like his clients can't access the mounted FS
even though the perms with it are likely the same.
The above procedure is to _test_ if the perms on theunderlying mount are causing his
nonroot users this trouble.
The permissions and ownership of the mount-point on the client prior to mounting are
irrelevant.
This is what my example showed. The mount point prior to mount was owned by root:root and
permissions
were such that a user could not save a file.
The exported directory is owned by a user whose UID/GID are equal on both server and
client.
Once the exported directory is mounted on the client, as shown, it retains the UID/GID and
permissions
which have been set on the server side. Subsequently, the user on the client can access
it normally.
Awaiting further details from Bob, myself.
> Example below. Note that this is a home system and I keep the UID and GID
> of all users the same on multiple system.
>
> Example: (The NFS client is meimei and I start with no file system mounted)
>
> [egreshko@meimei ~]$ whoami
> egreshko
>
> [egreshko@meimei ~]$ ls -ld /mnt
> drwxr-xr-x. 3 root root 4096 Jul 25 08:35 /mnt
>
> [egreshko@meimei ~]$ touch /mnt/x
> touch: cannot touch '/mnt/x': Permission denied
Aye, but I have the impression that his failure happen post mount, not before the mount.
I don't know why you cut off the rest of my post. To do so eliminates the
demonstration that
it mattered not that pre-mount the mount point didn't have write access to the user.
You will note
that the directory was "755" as your reply suggested.
Yes, it happens "post mount". But changing the settings of the "pre
mount" mount point of the
client won't affect the outcome.
--
The key to getting good answers is to ask good questions.