problem with NFS
am 15.09.2006 17:42:43 von Luca Ferrari
Hi all,
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?
Thanks,
Luca
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: problem with NFS
am 15.09.2006 18:09:47 von Aslan Carlos
Hi Luca,=20
Maybe you need use the 'no_root_squash' into (rw,sync)...
cause the problem, I guess was permission to nfs.
best regards,
Aslan Carlos.
Em Sex, 2006-09-15 Ã s 17:42 +0200, Luca Ferrari escreveu:
> Hi all,
> I've got a suse linux server where I exported a root-created director=
y as=20
> follows:
>=20
> 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)
>=20
>=20
> and an old opensco server (192.168.201.63) that should be able to mou=
nt the=20
> exported directory. Now I execute the following command on the sco se=
rver:
> # 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 1=
7:36:17
>=20
> Now the filesystem is mounted in read-write mode, and it belongs to r=
oot:=20
> # ls -ald /mnt
> drwxr-xr-x 2 root root 48 Sep 15 16:23 /mnt
>=20
> but I cannot write to it!
>=20
> # cd /mnt
> # echo "ciao" > ciao.txt
> ciao.txt: cannot create
>=20
> Anyone can explain me why? I guess the NFS exporting is right, and al=
so the=20
> mounting, but it looks like there's a problem with owner and group. A=
ny idea?
>=20
> Thanks,
> Luca
>=20
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin=
" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: problem with NFS
am 16.09.2006 13:54:26 von Glynn Clements
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
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html