LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-26-2013, 01:50 PM   #1
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155
Blog Entries: 2

Rep: Reputation: 15
NFS issue not able to write in nfsshare


i have NFS server running in Red Hat Enterprise Linux Server release 6.0 (Santiago)


my client is centos-6.3 ( server will be upgraded to centos -6.3 later)

these are mount points configured in server

cat /etc/exports
/stt2 *(rw,sync,no_root_squash,no_all_squash)
/stt3 *(rw,sync,no_root_squash,no_all_squash)
both stt2 and stt3 are in 755 permission


On the client side ,
stt-server2:/stt2 /stt2 nfs rsize=8192,wsize=8192,timeo=14,intr,sync
stt-server2:/stt3 /stt3 nfs rsize=8192,wsize=8192,timeo=14,intr,sync


i could mount from the client side but the issue is all fileand folders have user and group are nobody and i cam not able to create folder and files under stt2 and stt3

Can you pls advice me to resolve the issue?
Thanks
 
Old 04-26-2013, 01:52 PM   #2
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
it says permission denied error

---------- Post added 04-26-13 at 01:53 PM ----------

I can able write as root user but not regular user. for regular user, it throws "Permission denied.."
 
Old 04-27-2013, 09:01 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
NFS relies on matching the uid (not acct name) on both ends eg both must have uid=500.

Last edited by chrism01; 04-28-2013 at 11:27 PM.
 
Old 04-28-2013, 10:44 AM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
as you are running CentOS 6.x you might want to drop NFSv3 and move to NFSv4. just a thought. you can also get around the uid= by changing to a set fsid=XXX

example:

Code:
[ray@centos ~]$ cat /etc/exports 
#
#	/etc/exports

#	NFS4
/exports *(rw,insecure,subtree_check,crossmnt,fsid=0)

#	NFSv3
/exports/centos/public *(rw,insecure,no_subtree_check,fsid=3010)
/exports/NFS_TV_Shows *(rw,insecure,no_subtree_check,fsid=3020)
this expect gives both NFSv3 and NFSv4 for my LAN. I have to continue with NFSv3 and use the insecure options due to having Apple OSx running in my LAN.

The clients use either autofs or fstab to mount as some of them are still not updated to the more current replacement for autofs.

here is the fstab entry from my RPi:

Code:
jackknife:/NFS_TV_Shows/    /home/pi/TV_Shows   nfs4   rsize=8192,wsize=8192,timeo=14,bg,intr  0 0
jackknife:/centos   /home/pi/Movies nfs4    rsize=8192,wsize=8192,timeo=14,bg,intr  0 0
Note the bg to put the mount process in the background so as not to slow the reboot/boot process down on the client. also note there is no sync option, this too can cause connection time issues. Last thing to note is that I mounted with nfs4 to improve performance.
 
Old 04-29-2013, 02:02 PM   #5
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
I did change nfs4 instead of nfs in /etc/fstab of client but still says nobody
 
Old 04-30-2013, 02:08 PM   #6
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
Finally , the issue is fixed by adding nfsvers=3 in fstab entry. Thanks for all the help!
 
Old 04-30-2013, 08:32 PM   #7
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
yes that is because as i mentioned your exports is in NFSv3, not NFSv4.
 
  


Reply



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
[SOLVED] NFS write performances issue frenchviking Linux - Server 2 02-11-2013 08:19 AM
NFS write problem, UID correct, rw in /etc/exports -but still cannot write polgard Linux - Networking 2 09-19-2008 03:14 AM
Can't write to NFS tom@condorcape.com Linux - Security 2 10-11-2006 02:01 AM
Nautilis NFS write issue roy4lty Fedora 0 12-22-2004 08:56 PM
Write to NFS reiserfs? Euronymous Linux - Networking 1 10-24-2004 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:13 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