Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-29-2016, 09:35 AM   #1
Registered: Sep 2008
Location: north-central Florida
Distribution: Lubuntu 19.04, Kubuntu 18.04
Posts: 120

Rep: Reputation: 15
NFS subdirectory - regular user can read - root user denied

I've set up a file server using nfs4 and included the following lines in my file-server's /etc/exports file:
Now, as a regular user on the machine, I can read and write to any file anywhere in the shared directory tree, even in levels beyond the two levels listed in the server's exports file.

However, as root user, I have permission only to read or write to files immediately in those two specified directories. When I try to list files one level beyond those two, I get a "Permission denied" error message.

The relevant UIDs and GIDs are identical on both machines. And even aside from that, I thought the root user should have universal permissions, no?

What could be going on to prevent the root user having access to files that a regular user can fully manipulate?
Old 12-29-2016, 10:12 AM   #2
Registered: Jan 2012
Location: South Africa
Posts: 509

Rep: Reputation: 203Reputation: 203Reputation: 203
Hi there,

Have a look at "man exports", and in particular the "User ID Mapping" section. It says:

Very often, it is not desirable that the root user on a client machine is also treated as root when accessing files on the NFS
server. To this end, uid 0 is normally mapped to a different id: the so-called anonymous or nobody uid. This mode of operation
(called `root squashing') is the default, and can be turned off with no_root_squash.
I hope this helps
1 members found this post helpful.
Old 12-29-2016, 01:59 PM   #3
Registered: Sep 2008
Location: north-central Florida
Distribution: Lubuntu 19.04, Kubuntu 18.04
Posts: 120

Original Poster
Rep: Reputation: 15
Yes, that did help completely. Thank you very much!


nfs4, permissions, users

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to access phpMyAdmin from my browser? Root user denied and regular user as well? cyberdome Linux - Newbie 9 03-30-2016 01:28 AM
[SOLVED] root denied permission to nfs mounted directory but user can read and write qajaq Linux - Networking 2 03-08-2016 09:53 AM
[SOLVED] Different date shown for regular user and root user tuxtutorials Linux - Server 6 11-27-2013 09:33 AM
[SOLVED] nfs: root: write to the server denied, read works. Why? JZL240I-U Linux - Software 8 03-15-2013 03:24 AM
Moving from root to regular user KingOfDreams Linux - General 1 01-14-2005 05:46 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration