[opensuse] chown not permitted on NFS share??
All, I have a VM in cloud I'm building up. It has openSUSE 12.3 on it. I want /srv to be a large space so I can put a sftp chroot set of jails on it. I ordered a 100 GB NFS share from the hosting company today and they created it for me. They actually had 2 options for diskspace and I ordered the cheaper "backup" space (which may be my problem). I'm trying to mount the NFS share to it. (I haven't worked much with NFS.) Before mounting /srv is owned by root:root and its mode is 755 just as expected. After mounting the NFS share on /srv, I have this: # ls -ld srv drwxrwsrwx+ 6 cyrus 96 4096 Jul 26 2013 srv I don't like the owner, nor the permissions. Trying to change the permissions chmod claims to work, but doesn't # chmod 0755 srv # ls -ld srv drwxr-sr-x+ 6 cyrus 96 4096 Jul 26 2013 srv chown simply doesn't work # chown root:root srv chown: changing ownership of âsrvâ: Operation not permitted The problem is recursive, so as I place folder trees on the /srv they all have the same owner and permissions. This is the line I added to /etc/fstab: 10.200.3.230:/mnt/pacers1/kvm672/kvm672 /srv nfs rw,relatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.200.3.230,mountvers=3,mountport=42425,mountproto=udp,local_lock=none,addr=10.200.3.230 0 0 I'm sure not all of that is needed, but I stole it! Is there anyway I can overcome this issue? Greg -- Greg Freemyer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 2013-07-25 at 17:50 -0400, Greg Freemyer wrote: Hi
I ordered a 100 GB NFS share from the hosting company today.
Do they give any clue as to how they export it or if you can control any bit of the export?
Before mounting /srv is owned by root:root and its mode is 755 just as expected.
No ACL?
After mounting the NFS share on /srv, I have this:
# ls -ld srv drwxrwsrwx+ 6 cyrus 96 4096 Jul 26 2013 srv
What does the ACL look like?
This is the line I added to /etc/fstab: 10.200.3.230:/mnt/pacers1/kvm672/kvm672 /srv nfs rw,relatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.200.3.230,mountvers=3,mountport=42425,mountproto=udp,local_lock=none,addr=10.200.3.230 0 0
How about mounting it manually and remove some variables: mount -t nfs 10.200.3.230:/mnt/pacers1/kvm672/kvm672 /srv What does the ls -ld look like now? If they're exporting nfs4 then that's what you get by default on the client in 12.3. Then you can use nfs4_setfacl if you can handle the learning curve, and of course they let you. Sorry can't be more specific. I had a demo with cifs via Amazon S3 a bit back but that's as far as I've been with cloud. As far as I could see, you controlled the server yourself but that was what looked like Debian on EC2. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Greg Freemyer wrote:
All,
I have a VM in cloud I'm building up. It has openSUSE 12.3 on it.
I want /srv to be a large space so I can put a sftp chroot set of jails on it.
I ordered a 100 GB NFS share from the hosting company today and they created it for me. They actually had 2 options for diskspace and I ordered the cheaper "backup" space (which may be my problem).
I'm trying to mount the NFS share to it. (I haven't worked much with NFS.)
Before mounting /srv is owned by root:root and its mode is 755 just as expected.
Yes, but not relevant. BTW, caution - all that follows relates to NFS < 4. I know nothing about NFS4.
After mounting the NFS share on /srv, I have this:
# ls -ld srv drwxrwsrwx+ 6 cyrus 96 4096 Jul 26 2013 srv
I don't like the owner, nor the permissions.
NFS is very simple-minded about ownerships. They are whatever UID and GID they are on the server. It's very important that the UID and GID tables on all machines using the mounts are the same as those on the server. (Hence NIS or similar)
Trying to change the permissions chmod claims to work, but doesn't # chmod 0755 srv # ls -ld srv drwxr-sr-x+ 6 cyrus 96 4096 Jul 26 2013 srv
chown simply doesn't work
Correct. You need to be root to use chown and NFS mounts usually (and SHOULD) be exported with root-squash so that rootly powers don't transfer through the mount from hacked client machines to the server. So you need to make ownership changes on the server, not on the clients. HTH, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
What options was the NFS share exported with? If it wasn't exported with no_root_squash, root on the client won't be able to change permissions/ownership of said share. An entry in /etc/exports like "/mnt/pacers1/kvm672/kvm672 client_host(rw,no_root_squash)" would be needed. -- Later, Darin On Thu, Jul 25, 2013 at 5:50 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
All,
I have a VM in cloud I'm building up. It has openSUSE 12.3 on it.
I want /srv to be a large space so I can put a sftp chroot set of jails on it.
I ordered a 100 GB NFS share from the hosting company today and they created it for me. They actually had 2 options for diskspace and I ordered the cheaper "backup" space (which may be my problem).
I'm trying to mount the NFS share to it. (I haven't worked much with NFS.)
Before mounting /srv is owned by root:root and its mode is 755 just as expected.
After mounting the NFS share on /srv, I have this:
# ls -ld srv drwxrwsrwx+ 6 cyrus 96 4096 Jul 26 2013 srv
I don't like the owner, nor the permissions.
Trying to change the permissions chmod claims to work, but doesn't # chmod 0755 srv # ls -ld srv drwxr-sr-x+ 6 cyrus 96 4096 Jul 26 2013 srv
chown simply doesn't work # chown root:root srv chown: changing ownership of âsrvâ: Operation not permitted
The problem is recursive, so as I place folder trees on the /srv they all have the same owner and permissions.
This is the line I added to /etc/fstab: 10.200.3.230:/mnt/pacers1/kvm672/kvm672 /srv nfs rw,relatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.200.3.230,mountvers=3,mountport=42425,mountproto=udp,local_lock=none,addr=10.200.3.230 0 0
I'm sure not all of that is needed, but I stole it!
Is there anyway I can overcome this issue?
Greg -- Greg Freemyer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Darin Perusich
-
Dave Howorth
-
Greg Freemyer
-
lynn