Understanding local access to NFS export


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Understanding local access to NFS export
# 1  
Old 03-06-2012
Understanding local access to NFS export

Hello,

I've inherited an NFS setup that allows external servers to write to an NFS share on a Centos box. Here is an example line from /etc/exports (there are four entries that only are different based on server IP adress).

/exports/foobar 10.3.14.15/255.255.255.255(rw,insecure,async,all_squash,anonuid=296,anongid=296)

(296="anonid" for both user and group)

Here's the entry from "exportfs -v":
/exports/foobar
10.3.14.15/255.255.255.255(rw,async,wdelay,insecure,root_squash,all_squash,no_subtree_check,anonuid=296,anongid =296)
The files and directories on that share are all owned by anonid:anonid.

I've had a request to make a local user (I'll call it "bobsmith") to the NFS server which will have full access to everything under "/exports/foobar/" (in order to perform cronned and manual clean-up tasks on the data).

I admit I am not very versed with NFS, but I'm good with Unix/Linux and usual permission assignment. I am just wary of changing permissions on the local directories and files to make this access possible to "bobsmith" for fear that it will affect or be affected by the changes done to data by remote access.

Any advice on this? Perhaps something simple I am missing in my knowledge?

Thanks!
# 2  
Old 03-07-2012
Why not add bobsmith to the group ownership of the directory?
# 3  
Old 03-07-2012
As mark suggested adding the user bobsmith to anongid group will do what you want. But, if anongid is owner of other directories as well and if you don't want bobsmith to have a peek on those other directories, you could probably implement ACL locally. Note, that you may need to remount the filesystem with acl option if it's not already enabled in /etc/fstab.

Code:
setfacl -m d:u:bobsmith:rwx /export/foobar

# 4  
Old 03-07-2012
Quote:
Originally Posted by admin_xor
As mark suggested adding the user bobsmith to anongid group will do what you want. But, if anongid is owner of other directories as well and if you don't want bobsmith to have a peek on those other directories, you could probably implement ACL locally. Note, that you may need to remount the filesystem with acl option if it's not already enabled in /etc/fstab.

Code:
setfacl -m d:u:bobsmith:rwx /export/foobar

Sorry I took so long to get back to this. You hit the nail on the head, and my fault for not adding that to the original post. There is one directory underneath the export that the bobsmith user should not have access to for this cleanup.

Thanks, I'll look deeper at setfacl!
# 5  
Old 03-07-2012
Quote:
Originally Posted by KickstartUF
There is one directory underneath the export that the bobsmith user should not have access to for this cleanup.
In this case, you can do an explicit deny on the folder:

Code:
setfacl -m u:bobsmith:--- /export/foobar/secret_folder

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

NFS share full access for local user

Hi All, Is it possible to give full access for a normal user in a NFS share? If its not possible is there a trick with which I can make it work? Thanks in advance Shyam (1 Reply)
Discussion started by: shyam2j
1 Replies

2. Shell Programming and Scripting

Problem in understanding export uses

i am beginner in shell scripting. not able to understand what below line will do. PS1=${HOST:=Žuname -nŽ}"$ " ; export PS1 HOST below is the script #!/bin/hash PS1=${HOST:=Žuname -nŽ}"$ " ; export PS1 HOST ; echo $PS1 and i getting the below output Žuname -nŽ$ (25 Replies)
Discussion started by: scriptor
25 Replies

3. AIX

CIFS share re-export NFS

Hi Guys, need help here. i have windows server that share a folder C:/ABCDE i configure samba client in AIX server as /EDCBA and it working fine. then i want to share this /EDCBA to another AIX server using NFS. in the /etc/exportfs i have put /EDCBA... (1 Reply)
Discussion started by: prossits
1 Replies

4. Red Hat

CIFS share re-export NFS

Hi Guys, need help here. i have windows server that share a folder C:/ABCDE i configure samba client in Linux server as /EDCBA and it working fine. then i want to share this /EDCBA to another Linux server using NFS. in the /etc/exportfs i have put /EDCBA - *(rw,no_root_squash) ... (1 Reply)
Discussion started by: prossits
1 Replies

5. AIX

nfs export

Hi How to export a file system from my aix box named ABC in such a way that everyone on the network should be able to import it When on the client side if they give showmount -e ABC it should show like this: # showmount -e ABC export list for ABC: /sybase/software (everyone) (2 Replies)
Discussion started by: newtoaixos
2 Replies

6. Solaris

nfs export not working at boot

we have a Solaris 8 nfs server that exported two shares. entries are in /etc/dfs/dfstab. clients have been accessing these shares for several years. we just rebooted this nfs server and noticed that no share gets exported. I don't see relevant messages from dmsg nor messages file, is there... (6 Replies)
Discussion started by: jalite19
6 Replies

7. Solaris

Could I re-export a NFS resource to a third server ?

Hey Guys. Could someone said if is possible take a NFS resource get it from a original Server a export it and mount it in a third server ? Thank in Advace.... SUN ADMIN (3 Replies)
Discussion started by: aggadtech08
3 Replies

8. Filesystems, Disks and Memory

Local NFS import / re-export using automount?

Hi, Can I do the following: On SunOS 5.8 /etc/vfstab: remote-host:/Volumes/webdata - /export/home/webdata nfs - yes rw,vers=3,soft,intr,bg,timeo=600 In /etc/auto_direct: /home/science $HOST:/export/home/webdata/science /home/science-edu ... (2 Replies)
Discussion started by: bloyall
2 Replies

9. Filesystems, Disks and Memory

NFS export filesystem with several partitions

I want to export the file system which consist of several partition. For example I export / and there are /home, /usr partitions. On client side I can see all files in /, but /home and /usr are empty. So far I failed to find the way to make other partitions visible in one mount. :confused: Of... (2 Replies)
Discussion started by: fmtu2005
2 Replies

10. HP-UX

nfs export permissions

Hello, If I have an export like: /usr/temp -rw=ram:alligator means that /usr/temp has "rw" permissions to ram and alligator machines and has "ro" to everyone else? (1 Reply)
Discussion started by: psimoes79
1 Replies
Login or Register to Ask a Question