FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 08-24-2012, 10:56 PM
 
Default NFS mounts and uid/gid/user names

Hi,

to not to stress the SD-card of my single board computer too much I
mounted a directory of my PC via NFS at my single board computer, so
that compilations and other task which need to be done while
installing will access the hd and not the SD-card.
(The singleboard computer is a Cortex A8/OMAP based one: 32 bit. The
PC is 64 bit AMD based.)

So far so nice...everything works fine: I can see the directory
on both ends.

In /etc/exports on the PC I entered this:
/tmp/NFS 192.168.178.25(async,rw,no_subtree_check)

When setting chmod 700 /tmp/NFS, chown root:root /tmp/NFS
on the server side (PC) I cannot write to the directory
as root on the client side (single board computer).
On both sides root is 0:0.

When setting chmod 777 /tmp/NFS on the server side, I am able to write
at the client side to the that directory, bit listing that files shows
me that they become owned by nobody:nobody which is
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh on the server side.

How can I acchieve, that files written on one side remain the same
uid/gid assignment on the other side?

Thank you very much in advance for any help!

Have a nice weekend!
Best regards,
mcc
 
Old 08-25-2012, 07:44 AM
Neil Bothwick
 
Default NFS mounts and uid/gid/user names

On Sat, 25 Aug 2012 00:56:41 +0200, meino.cramer@gmx.de wrote:

> In /etc/exports on the PC I entered this:
> /tmp/NFS 192.168.178.25(async,rw,no_subtree_check)
>
> When setting chmod 700 /tmp/NFS, chown root:root /tmp/NFS
> on the server side (PC) I cannot write to the directory
> as root on the client side (single board computer).
> On both sides root is 0:0.
>
> When setting chmod 777 /tmp/NFS on the server side, I am able to write
> at the client side to the that directory, bit listing that files shows
> me that they become owned by nobody:nobody which is
> nobody:x:65534:65534:nobody:/nonexistent:/bin/sh on the server side.

Where did you get the no_subtree_check options from? If you'd read it in
the man page you'd have seen that you also need no_root_squash. Without
this option, the root user on the client is mapped to a non-root user on
the server.


--
Neil Bothwick

WinErr 079: Mouse not found - A mouse driver has not been installed.
Please click the left mouse button to continue.
 
Old 08-25-2012, 07:45 AM
Alex Schuster
 
Default NFS mounts and uid/gid/user names

meino.cramer@gmx.de writes:


to not to stress the SD-card of my single board computer too much I
mounted a directory of my PC via NFS at my single board computer, so
that compilations and other task which need to be done while
installing will access the hd and not the SD-card.
(The singleboard computer is a Cortex A8/OMAP based one: 32 bit. The
PC is 64 bit AMD based.)

So far so nice...everything works fine: I can see the directory
on both ends.

In /etc/exports on the PC I entered this:
/tmp/NFS 192.168.178.25(async,rw,no_subtree_check)

When setting chmod 700 /tmp/NFS, chown root:root /tmp/NFS
on the server side (PC) I cannot write to the directory
as root on the client side (single board computer).
On both sides root is 0:0.

When setting chmod 777 /tmp/NFS on the server side, I am able to write
at the client side to the that directory, bit listing that files shows
me that they become owned by nobody:nobody which is
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh on the server side.

How can I acchieve, that files written on one side remain the same
uid/gid assignment on the other side?


Add 'root_no_squash' to your options in /etc/exports.


Have a nice weekend!


Will do!

Wonko
 

Thread Tools




All times are GMT. The time now is 02:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org