LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


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

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:
Code:
/share 192.168.0.30(rw) 192.168.0.40(rw)
/share/datalib 192.168.0.30(rw) 192.168.0.40(rw)
Now, as a regular user on the 192.168.0.40 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
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 503

Rep: Reputation: 189Reputation: 189
Hi there,

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

Quote:
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
qajaq
Member
 
Registered: Sep 2008
Location: north-central Florida
Distribution: Lubuntu 19.04, Kubuntu 18.04
Posts: 115

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


Reply

Tags
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:41 PM.

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