LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-23-2010, 01:03 PM   #1
avtandil_k
Member
 
Registered: Feb 2010
Distribution: CentOS,openSUSE
Posts: 30

Rep: Reputation: 16
NFS share permission denied


Hi,
I'm sure there is a very trivial solution to my problem but I just can't figure it out due to my lack of knowledge.

I want to mount an nfs share share on client1. The share is on server1.
The server1 /etc/exportfs has entry:

/backup client1(rw,all_squash,no_subtree_check)

The client1 sudo mount works just fine:
sudo mount server1:/backup /backup

and obviously the ls -l shows

drwxr-xr-x 2 root root 4096 Mar 23 12:07 backup

But I want a regular user to be able to read/write to that nfs folder. And with the regular user I get

touch: cannot touch `backup/test': Permission denied

Can anyone let me know how to mount the nfs whare with options to read/write permissions for a regular user. And then put that mount into /etc/fstab? Should I mount first and then change the ownership of that folder?

Thanks!!!
 
Old 03-23-2010, 01:06 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Code:
all_squash
    Map all uids and gids to the anonymous user. Useful for NFS-exported public FTP directories, 
    news spool directories, etc. The opposite option is no_all_squash, which is the default setting.
So when you're a user you don't have permissions... if you're the only user accessing it you might want to set the anonuid anongid everything is getting squashed to.
 
Old 03-23-2010, 01:27 PM   #3
avtandil_k
Member
 
Registered: Feb 2010
Distribution: CentOS,openSUSE
Posts: 30

Original Poster
Rep: Reputation: 16
Thanks. I've read somewhere about it. So, if the user1 on client1 has uid 500 and gid 500 the /etc/exports should just have: anonuid=500,anongid=500?
 
Old 03-23-2010, 02:13 PM   #4
avtandil_k
Member
 
Registered: Feb 2010
Distribution: CentOS,openSUSE
Posts: 30

Original Poster
Rep: Reputation: 16
I think I found the solution. Will post it later.
 
Old 03-23-2010, 02:34 PM   #5
avtandil_k
Member
 
Registered: Feb 2010
Distribution: CentOS,openSUSE
Posts: 30

Original Poster
Rep: Reputation: 16
Created a user and a group on the NFS server to match the uid and gid of the user1 on the client1.
changed the ownerwhip of the NFS folder to share with a client1 to the newly created user.
Now it all works. As I though - lack on knowledge and understanding on how the NFS user permissions mapping works made me go through a lot this morning.
 
  


Reply

Tags
denied, nfs, permission, share



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
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
Permission Denied Error Message when trying to mount an NFS share kaplan71 Fedora 1 02-14-2009 07:26 AM
Permission denied trying to mount nfs share leupi Linux - Networking 1 07-30-2007 01:32 AM
nfs share: permission denied Kropotkin *BSD 11 01-10-2007 08:15 AM
Mounting an nfs share - Permission Denied doctorwebbox Linux - Networking 5 05-30-2005 01:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:28 AM.

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
Open Source Consulting | Domain Registration