Link to home
Start Free TrialLog in
Avatar of Jasaida
Jasaida

asked on

mount directory with change owner

how to change owner permission from mounted ubuntu directory to another ubuntu?
from target i add   share/directory   ipaddress(rw,sync,no_subtree_check)     in /etc/exports
from another ubuntu i  add following to fstab
ip:/share/directory  /mnt/archive nfs auto 0 0
its moun wiothout any problem but users not right to change or write in directory.
How to change (chown) permission under mount (dest.) not in the source (target).
Avatar of David Favor
David Favor
Flag of United States of America image

https://serverfault.com/questions/240897/how-to-properly-set-permissions-for-nfs-folder-permission-denied-on-mounting-en provides great detail about how this works.

When I use to work with NFS + AFS every day inside IBM, we had a set of scripts which ran all the time... on every machine to ensure matching users + groups on every single machine. Whenever a mismatch was caught, an email was sent to an admin list for manual intervention to fix problems.

Generally, for NFS to work flawlessly, best to have matching user/uid + group/gid settings on all your machines.

You can try fixing things with setfacl at various ends + this approach tends to be very hard to debug.

Simple Test: Sync the uid/gid of the one user/group you're trying to effect + see if all your problems magically heal.
Avatar of Jasaida
Jasaida

ASKER

ok. here is an example in this link
/home/darren       192.168.1.1/24(rw,all_squash,anonuid=1001,anongid=1001)
They say if both user is 1001 in both server but what should it be if i want to use as the anonymous user?
Thhey just mension it but no eksample.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.