linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Glynn Clements <glynn@gclements.plus.com>
To: Luca Ferrari <fluca1978@infinito.it>
Cc: linux-admin <linux-admin@vger.kernel.org>
Subject: Re: problem with NFS
Date: Sat, 16 Sep 2006 12:54:26 +0100	[thread overview]
Message-ID: <17675.58866.714360.315769@cerise.gclements.plus.com> (raw)
In-Reply-To: <200609151742.43422.fluca1978@infinito.it>


Luca Ferrari wrote:

> I've got a suse linux server where I exported a root-created directory as 
> follows:
> 
> server:~ # ls -ald /vol2/backup_opensco/
> drwxr-xr-x  2 root root 48 Sep 15 17:23 /vol2/backup_opensco/
> server:~ # cat /etc/exports
> /vol2/backup_opensco 192.168.201.63(rw,sync)
> 
> 
> and an old opensco server (192.168.201.63) that should be able to mount the 
> exported directory. Now I execute the following command on the sco server:
> # mount -f NFS 192.168.201.1:/vol2/backup_opensco /mnt
> # mount
> / on /dev/root read/write on Fri Sep 15 15:04:32 2006
> /stand on /dev/boot read only on Fri Sep 15 15:04:33 2006
> /mnt on 192.168.201.1:/vol2/backup_opensco read/write on Fri Sep 15 17:36:17
> 
> Now the filesystem is mounted in read-write mode, and it belongs to root: 
> # ls -ald /mnt
> drwxr-xr-x   2 root     root          48 Sep 15 16:23 /mnt
> 
> but I cannot write to it!
> 
> # cd /mnt
> # echo "ciao" > ciao.txt
> ciao.txt: cannot create
> 
> Anyone can explain me why? I guess the NFS exporting is right, and also the 
> mounting, but it looks like there's a problem with owner and group. Any idea?

By default, NFS treats root accounts as disjoint, i.e. root on the
client isn't the same as root on the server; any remote accesses as
root are mapped to the "nobody" account. As the directory is only
writable by root, you can't write to it from the client.

You can disable this behaviour by adding the no_root_squash option to
the export. However, bear in mind that this represents a security
risk; if possible, it's better to change the ownership of the exported
files so that they can be modified by a non-root account.

-- 
Glynn Clements <glynn@gclements.plus.com>

      parent reply	other threads:[~2006-09-16 11:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-15 15:42 problem with NFS Luca Ferrari
2006-09-15 16:09 ` Aslan Carlos
2006-09-16 11:54 ` Glynn Clements [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17675.58866.714360.315769@cerise.gclements.plus.com \
    --to=glynn@gclements.plus.com \
    --cc=fluca1978@infinito.it \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).