All of lore.kernel.org
 help / color / mirror / Atom feed
* Newbie NFS permissions question.
@ 2006-04-19 10:23 Tony
  2006-04-19 13:40 ` Steve Dickson
  0 siblings, 1 reply; 6+ messages in thread
From: Tony @ 2006-04-19 10:23 UTC (permalink / raw)
  To: nfs

[-- Attachment #1: Type: text/plain, Size: 858 bytes --]

Hi all.

 

I've used NFS in the past but only for file sharing, but now I need to use
it in a live environment for uses email/web etc across load balanced
servers.

The problem I have is that the maildirs have to be owned by the user they
belong to as does the web content.

However when I mount an NFS share on both servers it's mounted as root with
full permissions.

The problem is every file/directory created in the mounted NFS share is also
created owned by root, even when I try to change the permission to a
different owner or try to chmod a file or directory it doesn't do anything.

Is there a way of being able to use NFS in the way I want?

 

I'm running this on Centos 4.3 servers with nfs-utils-1.0.6-65.EL4.

 

Thanks

Tony


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


[-- Attachment #2: Type: text/html, Size: 3447 bytes --]

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

* Re: Newbie NFS permissions question.
  2006-04-19 10:23 Newbie NFS permissions question Tony
@ 2006-04-19 13:40 ` Steve Dickson
  2006-04-19 14:50   ` Tony
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Dickson @ 2006-04-19 13:40 UTC (permalink / raw)
  To: Tony; +Cc: nfs



Tony wrote:
> I=92ve used NFS in the past but only for file sharing, but now I need t=
o=20
> use it in a live environment for uses email/web etc across load balance=
d=20
> servers.
>=20
> The problem I have is that the maildirs have to be owned by the user=20
> they belong to as does the web content.
>=20
> However when I mount an NFS share on both servers it=92s mounted as roo=
t=20
> with full permissions.
What NFS version are you using 2, 3 or 4?

>=20
> The problem is every file/directory created in the mounted NFS share is=
=20
> also created owned by root, even when I try to change the permission to=
=20
> a different owner or try to chmod a file or directory it doesn=92t do=20
> anything.
Setting the 'no_root_squash' export option on the server might help...

steved.


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

* RE: Newbie NFS permissions question.
  2006-04-19 13:40 ` Steve Dickson
@ 2006-04-19 14:50   ` Tony
  2006-04-20  9:09     ` Tony
  0 siblings, 1 reply; 6+ messages in thread
From: Tony @ 2006-04-19 14:50 UTC (permalink / raw)
  To: 'Steve Dickson'; +Cc: nfs

Looks like I'm running version 3.=0A=
I'll try the 'no_root_squash' option, just installing 2 new boxes so I'll=
=0A=
try it on them.=0A=
=0A=
Thanks=0A=
Tony=0A=
=0A=
-----Original Message-----=0A=
From: nfs-admin@lists.sourceforge.net=0A=
[mailto:nfs-admin@lists.sourceforge.net] On Behalf Of Steve Dickson=0A=
Sent: 19 April 2006 14:41=0A=
To: Tony=0A=
Cc: nfs@lists.sourceforge.net=0A=
Subject: Re: [NFS] Newbie NFS permissions question.=0A=
=0A=
=0A=
=0A=
Tony wrote:=0A=
> I've used NFS in the past but only for file sharing, but now I need to=20=
=0A=
> use it in a live environment for uses email/web etc across load balanced=
=20=0A=
> servers.=0A=
>=20=0A=
> The problem I have is that the maildirs have to be owned by the user=20=
=0A=
> they belong to as does the web content.=0A=
>=20=0A=
> However when I mount an NFS share on both servers it's mounted as root=20=
=0A=
> with full permissions.=0A=
What NFS version are you using 2, 3 or 4?=0A=
=0A=
>=20=0A=
> The problem is every file/directory created in the mounted NFS share is=
=20=0A=
> also created owned by root, even when I try to change the permission to=
=20=0A=
> a different owner or try to chmod a file or directory it doesn't do=20=0A=
> anything.=0A=
Setting the 'no_root_squash' export option on the server might help...=0A=
=0A=
steved.=0A=
=0A=
=0A=
-------------------------------------------------------=0A=
Using Tomcat but need to do more? Need to support web services, security?=
=0A=
Get stuff done quickly with pre-integrated technology to make your job=0A=
easier=0A=
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo=
=0A=
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=120709&bid&3057&dat=121642=0A=
_______________________________________________=0A=
NFS maillist  -  NFS@lists.sourceforge.net=0A=
https://lists.sourceforge.net/lists/listinfo/nfs=0A=
=0A=
--=20=0A=
This message has been scanned for viruses and=0A=
dangerous content by MailScanner, and is=0A=
believed to be clean.=0A=
=0A=
=0A=
=0A=
--=20=0A=
This message has been scanned for viruses and=0A=
dangerous content by MailScanner, and is=0A=
believed to be clean.=0A=
=0A=


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

* RE: Newbie NFS permissions question.
  2006-04-19 14:50   ` Tony
@ 2006-04-20  9:09     ` Tony
  2006-04-20  9:31       ` Steve Dickson
  0 siblings, 1 reply; 6+ messages in thread
From: Tony @ 2006-04-20  9:09 UTC (permalink / raw)
  To: 'Tony', 'Steve Dickson'; +Cc: nfs

I've now got 2 new servers and have been able to NFS mount a share from=0A=
server 1 to server 2.=0A=
I can chmod, chown and chgrp of files and directories on server 2 as long as=
=0A=
the user and group exist on server 1.=0A=
Is this the default behaviour for NFS?=0A=
Does the user and group have to exist on the server sharing?=0A=
Is there a way of being able to change the ownership of a file or directory=
=0A=
without the user or/and group having to exist on the server allowing the=0A=
share?=0A=
=0A=
Thanks=0A=
Tony=0A=
=0A=
-----Original Message-----=0A=
From: nfs-admin@lists.sourceforge.net=0A=
[mailto:nfs-admin@lists.sourceforge.net] On Behalf Of Tony=0A=
Sent: 19 April 2006 15:51=0A=
To: 'Steve Dickson'=0A=
Cc: nfs@lists.sourceforge.net=0A=
Subject: RE: [NFS] Newbie NFS permissions question.=0A=
=0A=
Looks like I'm running version 3.=0A=
I'll try the 'no_root_squash' option, just installing 2 new boxes so I'll=
=0A=
try it on them.=0A=
=0A=
Thanks=0A=
Tony=0A=
=0A=
-----Original Message-----=0A=
From: nfs-admin@lists.sourceforge.net=0A=
[mailto:nfs-admin@lists.sourceforge.net] On Behalf Of Steve Dickson=0A=
Sent: 19 April 2006 14:41=0A=
To: Tony=0A=
Cc: nfs@lists.sourceforge.net=0A=
Subject: Re: [NFS] Newbie NFS permissions question.=0A=
=0A=
=0A=
=0A=
Tony wrote:=0A=
> I've used NFS in the past but only for file sharing, but now I need to=20=
=0A=
> use it in a live environment for uses email/web etc across load balanced=
=20=0A=
> servers.=0A=
>=20=0A=
> The problem I have is that the maildirs have to be owned by the user=20=
=0A=
> they belong to as does the web content.=0A=
>=20=0A=
> However when I mount an NFS share on both servers it's mounted as root=20=
=0A=
> with full permissions.=0A=
What NFS version are you using 2, 3 or 4?=0A=
=0A=
>=20=0A=
> The problem is every file/directory created in the mounted NFS share is=
=20=0A=
> also created owned by root, even when I try to change the permission to=
=20=0A=
> a different owner or try to chmod a file or directory it doesn't do=20=0A=
> anything.=0A=
Setting the 'no_root_squash' export option on the server might help...=0A=
=0A=
steved.=0A=
=0A=
=0A=
-------------------------------------------------------=0A=
Using Tomcat but need to do more? Need to support web services, security?=
=0A=
Get stuff done quickly with pre-integrated technology to make your job=0A=
easier=0A=
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo=
=0A=
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=120709&bid&3057&dat=121642=0A=
_______________________________________________=0A=
NFS maillist  -  NFS@lists.sourceforge.net=0A=
https://lists.sourceforge.net/lists/listinfo/nfs=0A=
=0A=
--=20=0A=
This message has been scanned for viruses and=0A=
dangerous content by MailScanner, and is=0A=
believed to be clean.=0A=
=0A=
=0A=
=0A=
--=20=0A=
This message has been scanned for viruses and=0A=
dangerous content by MailScanner, and is=0A=
believed to be clean.=0A=
=0A=
=0A=
=0A=
-------------------------------------------------------=0A=
Using Tomcat but need to do more? Need to support web services, security?=
=0A=
Get stuff done quickly with pre-integrated technology to make your job=0A=
easier=0A=
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo=
=0A=
http://sel.as-us.falkag.net/sel?cmd_________________________________________=
=0A=
______=0A=
NFS maillist  -  NFS@lists.sourceforge.net=0A=
https://lists.sourceforge.net/lists/listinfo/nfs=0A=
=0A=
=0A=
--=20=0A=
This message has been scanned for viruses and=0A=
dangerous content by MailScanner, and is=0A=
believed to be clean.=0A=
=0A=


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

* Re: Newbie NFS permissions question.
  2006-04-20  9:09     ` Tony
@ 2006-04-20  9:31       ` Steve Dickson
  2006-04-20 11:00         ` Tony
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Dickson @ 2006-04-20  9:31 UTC (permalink / raw)
  To: Tony; +Cc: nfs

Tony wrote:
> I've now got 2 new servers and have been able to NFS mount a share from
> server 1 to server 2.
This confuses me... You mean a "share from server 1 _and_ server 2"
right?

> I can chmod, chown and chgrp of files and directories on server 2 as long as
> the user and group exist on server 1.
> Is this the default behaviour for NFS?
No... this does not make any senses...

> Does the user and group have to exist on the server sharing?
In general, the user and group should exist on both the server
and client; but the user and group ids do not have to explicitly
exist on the server...

> Is there a way of being able to change the ownership of a file or directory
> without the user or/and group having to exist on the server allowing the
> share?
Yes... On the server export the filesystem with the 'no_root_squash'
option which will allow root on the client to change ownerships with
the chown command.

steved.


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

* RE: Newbie NFS permissions question.
  2006-04-20  9:31       ` Steve Dickson
@ 2006-04-20 11:00         ` Tony
  0 siblings, 0 replies; 6+ messages in thread
From: Tony @ 2006-04-20 11:00 UTC (permalink / raw)
  To: 'Steve Dickson'; +Cc: nfs

Ok it was me doing something wrong as I just tried it again and it worked.
Sorry.....

What's the best line to put into /etc/fstab to mount the share?
Currently I have:

192.168.1.1:/data /home nfs rsize=8192,wsize=8192,timeo=14,intr 0 0


Thanks
Tony

-----Original Message-----
From: Steve Dickson [mailto:SteveD@redhat.com] 
Sent: 20 April 2006 10:32
To: Tony
Cc: nfs@lists.sourceforge.net
Subject: Re: [NFS] Newbie NFS permissions question.

Tony wrote:
> I've now got 2 new servers and have been able to NFS mount a share from
> server 1 to server 2.
This confuses me... You mean a "share from server 1 _and_ server 2"
right?

> I can chmod, chown and chgrp of files and directories on server 2 as long
as
> the user and group exist on server 1.
> Is this the default behaviour for NFS?
No... this does not make any senses...

> Does the user and group have to exist on the server sharing?
In general, the user and group should exist on both the server
and client; but the user and group ids do not have to explicitly
exist on the server...

> Is there a way of being able to change the ownership of a file or
directory
> without the user or/and group having to exist on the server allowing the
> share?
Yes... On the server export the filesystem with the 'no_root_squash'
option which will allow root on the client to change ownerships with
the chown command.

steved.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

end of thread, other threads:[~2006-04-20 11:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-19 10:23 Newbie NFS permissions question Tony
2006-04-19 13:40 ` Steve Dickson
2006-04-19 14:50   ` Tony
2006-04-20  9:09     ` Tony
2006-04-20  9:31       ` Steve Dickson
2006-04-20 11:00         ` Tony

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.