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 > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-24-2008, 05:54 PM
Jari Aalto
 
Default NFS and no_root_squash - cannot write as root - permission denied

Can anyone suggest what might be wrong as root user cannot write to the
NFS mounted directory.

At client, the mount succeeds, but write doesn't. The 'no_root_squash'
is enabled at server, the UUID's match, so where is the problem[1]?.

Jari

AT CLIENT (192.168.1.12 / Debian unstable)

$ dpkg -l nfs-common
ii nfs-common 1:1.1.3-1

$ mount 192.168.1.7:/mnt/local/storage/share/src /mnt/tmp
<ok, no errors>

$ mount | grep 1.7
192.168.1.7:/mnt/local/storage/share/src on /mnt/tmp type nfs (rw,addr=192.168.1.7)

$ ls -l /mnt/tmp
drwxrwsr-x 4 root src 4096 2008-08-24 20:28 .

$ id -a
uid=0(root) gid=0(root) groups=0(root)

$ touch /mnt/tmp/test.tmp
touch: cannot touch `/mnt/tmp/test.tmp': Permission denied

AT SERVER (192.168.1.7 / Debian testing)

- Version

$ dpkg -l nfs-kernel-server
ii nfs-kernel-server 1:1.1.2-6

- /etc/exports contains 'no_root_squash' which should allow root access

/mnt/local/storage/share/src 192.168.1.0/27(rw,sync,no_root_squash,no_subtree_check)

- How Kernel sees the exports (after "exportfs -rav"):

$ cat /proc/fs/nfs/exports
# Version 1.1
# Path Client(Flags) # IPs
/mnt/local/storage/share/src 192.168.1.0/27(rw,no_root_squash,sync,wdelay,no_subtree_check, uuid=d16a2f42:9a504489:a7888624:c832a7f3)

$ showmount -e | grep src
/mnt/local/storage/share/src 192.168.1.0/27

- identity and write test

$ id -a
uid=0(root) gid=0(root) groups=0(root)

$ touch /mnt/local/storage/share/src/test.tmp
$ ls -la /mnt/local/storage/share/src/test.tmp
-rw-r--r-- 1 root src 0 2008-08-24 20:52 /mnt/local/storage/share/src/test.tmp
$ rm /mnt/local/storage/share/src/test.tmp

- Directory permissions

$*ls -la /mnt/local/storage/share/src
drwxrwsr-x 4 root src 4096 2008-08-24 20:28 .

- No service restrictions

$ cat /etc/hosts.allow
<empty>

$ cat /etc/hosts.deny
<empty>

- No firewalls

$ iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

[1]
I've read all of this, but it doesn't explain what's missing here.

"I do not have permission to access files on the mounted volume"
http://nfs.sourceforge.net/nfs-howto/ar01s07.html



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-24-2008, 09:57 PM
Bob
 
Default NFS and no_root_squash - cannot write as root - permission denied

Jari Aalto wrote:

> Can anyone suggest what might be wrong as root user cannot write to the
> NFS mounted directory.
>
> At client, the mount succeeds, but write doesn't. The 'no_root_squash'
> is enabled at server, the UUID's match, so where is the problem[1]?.
>
> Jari
>
> AT CLIENT (192.168.1.12 / Debian unstable)
>
> $ dpkg -l nfs-common
> ii *nfs-common * * * * * *1:1.1.3-1

Bug #492970


Downgrade nfs-common to 1:1.1.2-6



Regards


Bob


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 09:38 PM.

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