All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem with sharing /home
@ 2011-01-09  7:41 Mahmood Naderan
  2011-01-09  9:33 ` Daniel Stodden
  0 siblings, 1 reply; 7+ messages in thread
From: Mahmood Naderan @ 2011-01-09  7:41 UTC (permalink / raw)
  To: linux-nfs

Hi,
I have a server (192.168.1.1) and worker (192.168.1.2) stations and want to 
share /home which is belong to the server. This is the content of my 
/etc/exports:
/home                192.168.1.2(rw,sync,no_root_squash)

Before sharing, the list of users on both stations are:
server: root, mahmood, user1, user2
worker: root, mahmood, user3, user4

As you can see two users are common. Then I opened /etc/fstab on worker and 
commnet the original /home line and added this line:
server:/home  /home  nfs defaults 0 0
 
Then I ran "sudo exportfs -a" on server and "sudo mount -a" on the worker. 
Please look at the output of "ls -l" command on both server and worker:
mahmood@server:home$ ls -l
total 36
drwxr-xr-x 28 user1       users    4096 2011-01-08 21:49 user1
drwxr-xr-x  4 user2        users    4096 2011-01-08 21:55 user2
drwx------  2 root       root    16384 2010-10-24 17:23 lost+found
drwxr-xr-x 26 mahmood    mahmood  4096 2011-01-09 10:49 mahmood

mahmood@worker:home$ ls -l
total 36
drwxr-xr-x  4 user3  users    4096 2011-01-08 21:55 user1
drwxr-xr-x  9 user4 users    4096 2011-01-08 23:05 user2
drwx------  2 root    root    16384 2010-10-24 17:23 lost+found
drwxr-xr-x 26 mahmood mahmood  4096 2011-01-09 10:49 mahmood
drwxrwxrwx  5 root    root     4096 2011-01-05 21:27 shared

As you can see, the permission of user1 and user2 home direcoties are granted to 
user3 and user4. But since "mahmood" and "root" have separate account on both 
stations, there is no problem with their access. 

 
The effect of this anomaly is that when user1 want to ssh from server to wroker, 
he can not write anything in his home direcotry:
user1@server:~$ mkdir a
user1@server:~$ ssh worker
enter password....
user1@worker:~$ mkdir b
mkdir: cannot create directory `b': Permission denied
user1@worker:~$

How can I fix that?

Thanks,
// Naderan *Mahmood;


      

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-01-09 12:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-09  7:41 Problem with sharing /home Mahmood Naderan
2011-01-09  9:33 ` Daniel Stodden
2011-01-09  9:43   ` Mahmood Naderan
2011-01-09 11:30     ` Daniel Stodden
2011-01-09  9:46   ` Mahmood Naderan
2011-01-09 11:41     ` Daniel Stodden
2011-01-09 11:59       ` Mahmood Naderan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.