Problems mounting NFS share

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
afora
Level 4
Level 4
Posts: 203
Joined: Mon Aug 26, 2019 7:35 pm

Problems mounting NFS share

Post by afora »

Hi guys,

Running LM19.3.

I have successfully installed nfs on both the server and client and I can even mount a directory on the client as below:

Code: Select all

sudo mount -o rw,hard,intr,bg 192.168.1.20:/ /media/user/NFS
Obviously I have the following entry on the server side in /etc/exports

Code: Select all

/media/user/SHARED 192.168.1.0/24(rw)
with both /media and /media/user having root ownership, while /media/user/SHARED is owned by user.

However, when I browse through the mounted share, it appears mounted as:

Code: Select all

/media/user/NFS/media/user/SHARED
which is very far from ideal since it's a redundant name involving /media/user/NFS and /media/user/SHARED, ie essentially the same path twice. Users will have to browse through several levels before arriving at the right base location on the server. Needless to say that the above example is the toy example for the forum and the actual file tree on the server is much deeper than that.

I also do not want to use bookmarks as having an NFS share shown in Devices or Network is very convenient as it makes it immediately visible to the user if the mount is available at any point of time.

I tried:

Code: Select all

sudo mount -o rw,hard,intr,bg 192.168.1.20:/media/user/SHARED /media/user/NFS
but it throws me the error:

Code: Select all

mount.nfs: access denied by server while mounting 192.168.1.20:/media/user/SHARED
QUESTION: is there any option on the client side I can specify while mounting that would mount the shared server directory DIRECTLY to /media/user/NFS/ rather than /media/user/NFS/media/user/SHARED.

Many thanks!
Last edited by afora on Fri Sep 04, 2020 9:03 pm, edited 2 times in total.
asinoro
Level 6
Level 6
Posts: 1163
Joined: Mon Feb 12, 2018 11:43 am

Re: Problems mounting NFS share

Post by asinoro »

afora
Level 4
Level 4
Posts: 203
Joined: Mon Aug 26, 2019 7:35 pm

Re: Problems mounting NFS share

Post by afora »

Thanks for the suggestion. Unfortunately it's not relevant to my question - I do not have any issues with fstab as you can see from the OP.
Post Reply

Return to “Newbie Questions”