NFS server RW perms

Thread Tools Search this Thread
Operating Systems Solaris NFS server RW perms
# 1  
Old 06-25-2011
NFS server RW perms


I can't write to fs "/share/nfs" shared by nfs server despite properly setting RW permissions.
NFS server is configured on CentOS and Solaris10 is client.

CentOS NFS Server config :
Entries in /etc/exports file :
[root@centos11 ~]# cat /etc/exports
/inst           *(ro,sync)
/share/nfs      *(rw,sync)

What shares nfs server :
[root@centos11 ~]# showmount -e localhost
Export list for localhost:
/inst      *
/share/nfs *

What sees nfs client :
# hostname
# showmount -e
export list for
/inst      *
/share/nfs *

SOLARIS10 NFS client config
How Solaris10 client machine mounted nfs share :
# mount
<output omitted>
/mnt/nfs on remote/read/write/setuid/devices/soft/vers=3/xattr/dev=4bc0002 on So cz 25 17:48:20 2011

I have no idea why I can't write changes to /share/nfs fs from Solaris10 client machine.
When I try to do this I get the following output :
# touch /mnt/nfs/file2.txt
touch: cannot create /mnt/nfs/file2.txt: Permission denied

Please advise me how to repair this.

thx for help
# 2  
Old 06-25-2011
Which version of CentOS are you using?

On the Centos NFS server, what is the output of
exportfs -v

# 3  
Old 06-25-2011
[root@centos11 ~]# exportfs -v
/share/nfs      <world>(rw,wdelay,root_squash,no_subtree_check,anonuid=65534,anongid=65534)
/inst           <world>(ro,wdelay,root_squash,no_subtree_check,anonuid=65534,anongid=65534)

# 4  
Old 06-25-2011
I had similar issue not so long ago. Try adding "insecure" option to /share/nfs export properties.
# 5  
Old 06-25-2011
@bartus11 I added 'insecure' deirective to /etc/exports file, restarted deamon but nothing changed.

---------- Post updated at 06:59 PM ---------- Previous update was at 06:23 PM ----------

I found the answer.
There was problem with "root_squash" option in /etc/exports file which is default option when not specified.

When this option is used, then while mounting using the command mount, the user ID ?root? on the NFS client will be replaced by the user ID ?nobody? on the NFS server. This is to prevent the root on the NFS client from taking a superuser privilege on the NFS server, thus perhaps illegally allowing him to modify files on the NFS server.

So I solve this :
1. mount -o remount,acl /share
2. setfacl -m user:nfsnobody:rwx /share/nfs

It mounts with UID=65534 and GUID=65534 which on CentOS=nfsnobody and on Solaris10=nobody4(UID) and nogroup(GID).

[root@centos11 share]# exportfs -v
/share/nfs <world>(rw,wdelay,insecure,root_squash,no_subtree_check,anonuid=65534,anongid=65534)
/inst <world>(ro,wdelay,root_squash,no_subtree_check,anonuid=65534,anongid=65534)

To display UID/GID on centos/sol10 use
$ ls -ln

You can of course change UID that mounts nfs share from default 65534 to whatever you like but it must exist on both systems : centos nad sol10 with the same UID/GID

Security :
The best would be to run nfs inside ssh tunnel.
Here you have how to do it --->
NFS Security - The Community's Center for Security
# 6  
Old 06-27-2011
what is the "root_squash" that you have a problem in , I think root not allowed to be used over network.
# 7  
Old 06-27-2011
I don't have problem with ''root_squash'' anymore. Read my answer above.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

AIX NFS Server and NFS Client

Hi 2 ALL, try to run NFS Server in AIX 7.1 : 1. Step by step on NFS Server node mkdir /tmp/test chgrp staff /tmp/test chmod 775 /tmp/test-- create export directory (fs) mknfsexp -d /tmp/test -t ro exportfs -va show mount -e :/# exportfs -av exports: 1831-187 re-exported /tmp/test... (4 Replies)
Discussion started by: penchev
4 Replies

2. Shell Programming and Scripting

Using find for variable combination of perms

Hi, I'm trying to use find in kshell (AIX) to find all files with perms of write for other AND any execute bit set. e.g: r--r-x-w- would qualify and rw-rw--wx would qualify but ---rwxr-xr-x wouldn't qualify So far, I've been trying something like this: find . -type f -perm... (4 Replies)
Discussion started by: alanp36
4 Replies

3. UNIX for Dummies Questions & Answers

Perms for Unix user

Can you describe how to give privileges to the user in normal use of your folder / home / user To be able to properly use Git and other applications of Python I've done something like chown-R myuser / home / myuser But there were some problems with Git commits.... like link unavailabe and... (3 Replies)
Discussion started by: sandrain
3 Replies

4. Programming

Determining file access perms for current process

Stupid question, but is there an ANSI C stdlib function that will do this for me? I want to pass the function a path and determine if the current process can read/write/execute on the path. I suppose I can whip something up using fstat and then determining the current process's user/group IDs and... (6 Replies)
Discussion started by: DreamWarrior
6 Replies

5. Solaris

Solaris 9 as a nfs client -- centos as a nfs server.

Hello, I have a centos as nfs server, its name is centos_A. After I finish the setup of the nfs server, the other linux can access this nfs server immediately via /net/centos_A/* But, My solaris 9 can not access /net/centos_A/* immediately. I have to leave /net/centos_A, and wait for about... (1 Reply)
Discussion started by: bruceharbin
1 Replies

6. UNIX for Dummies Questions & Answers

NFS Server

How can i create a nfs share in Windows? (4 Replies)
Discussion started by: proactiveaditya
4 Replies

7. Solaris

NFS write failed for server.....error 11 (RPC: Server can't decode arguments)

Hello! I have a Linux nfs server (called server100 below) with a export nfs. My problem is that the Solaris client (called client100 below) doesn't seems to like it. In the Solaris syslog I got following messages (and after a while the solaris client behave liked its hanged/to buzy). Also see... (3 Replies)
Discussion started by: sap4ever
3 Replies

8. UNIX for Dummies Questions & Answers

Can't start nfs server!

ok i am pretty new i am thinking this maybe a dns situatioan i dunno.... i am trying to start nfs server i get the followin error: mountd svc_tli create could not bind to requested address: address mismatch svc_create: svc_tli_create failed /usr/lib/nfs/nfsd : tli_bind to wrong address... (14 Replies)
Discussion started by: rmuhammad
14 Replies

9. UNIX for Advanced & Expert Users

selective tar image and dir perms

Hi, I'm creating a tar image containing selected files held in a manifest file thus: cat <manifest file> | xargs tar -cvpf tar.out I need to preserve the directory as well as the file perms. When my list contains no separate directory lines, the directory is created implicitly when the... (4 Replies)
Discussion started by: gfarley
4 Replies
Login or Register to Ask a Question