Re: doubts on NFS
I was told by a little bird on this list to set the -root=0 option, maybe little bird meant -maproot=0 :) And yes, i HUPed. But it's all working now, the magic was to add the missing line to fstab. Thanks everybody for your tips and help on this Regards, Marcos Laufer Jan Stary escribis: > On Jul 06 22:53:21, Marcos Laufer wrote: > >> Edd , >> >> This are the permissions: >> >> hq:/{19}# ls -al |grep mnt >> drwxr-xr-x 2 root wheel 512 Nov 3 2008 mnt/ >> hq:/{20}# >> >> I am mounting this as root . >> >> I also added -root=0 to /etc/exports , >> > > There is no such option. Do you mean maproot? > Did you HUP mountd after you changed the config file? > > >> still same behavior >> Regards, >> Marcos Laufer
Re: doubts on NFS
Sorry, the 10.10.10.101 was a mistyping of mine. It's another IP i used to try mounting the slice from. I removed it and not HUPed mountd, that's why it showed up with showmount. This are the permissions you just asked: backup:~{2}# cd /u/data/ backup:/u/data{3}# ls a-l|grep export ls: a-l: No such file or directory backup:/u/data{4}# ls -al|grep export drwxr-xr-x 2 root wheel 512 Jul 6 21:29 export/ backup:/u/data{5}# Jan Stary escribis: > On Jul 06 16:40:31, Marcos Laufer wrote: > >> Hello list , >> >> I am having trouble to make NFS work properly. I don't know what i am >> doing wrong, maybe someone can enlighten me. >> >> NFS server and client are both OpenBSD 4.4 GENERIC >> >> I am starting portmap, nfsd and mountd on the nfs server (10.10.10.65). >> >> >> This is my /etc/exports on 10.10.10.65: >> >> # $OpenBSD: exports,v 1.2 2002/05/31 08:15:44 pjanzen Exp $ >> # >> # NFS exports Database >> # See exports(5) for more information. Be very careful: misconfiguration >> # of this file can result in your filesystems being readable by the world. >> >> /u/data/export -alldirs -maproot=0 10.10.10.16 >> >> -- >> >> >> On the client machine (10.10.10.16) : >> >> hq:/{190}# showmount -e 10.10.10.65 >> Exports list on 10.10.10.65: >> /u/data/export 10.10.10.16 10.10.10.101 >> > > Why is this different from what the server actually exports? > Namely, how did 10.10.10.101 get in here? > > >> hq:/{191}# mount -o rw -t nfs 10.10.10.65:/u/data/export /mnt/ >> hq:/{192}# df -h >> FilesystemSizeUsed Avail Capacity Mounted on >> /dev/wd0a 509M 74.7M409M15%/ >> /dev/wd0d 508M4.2M478M 1%/tmp >> /dev/wd0e 3.9G2.6G1.2G69%/usr >> /dev/wd0f 508M 78.9M403M16%/var >> /dev/wd0g 949M2.7M899M 0%/var/log >> /dev/wd0h65.0G 43.5G 18.2G70%/u >> 10.10.10.65:/u/data/export 65.0G 40.4G 21.3G65%/mnt >> >> So far so good. Then i try to write something: >> >> hq:/{193}# cd /mnt/ >> >> >> hq:/mnt{194}# cp /bin/ls ./ >> >> >> cp: ./ls: Permission denied >> hq:/mnt{195}# >> >> What am i doing wrong here? >> > > What are the permissions of /u/data/export on the server?
Re: doubts on NFS
On Jul 06 16:40:31, Marcos Laufer wrote: > Hello list , > > I am having trouble to make NFS work properly. I don't know what i am > doing wrong, maybe someone can enlighten me. > > NFS server and client are both OpenBSD 4.4 GENERIC > > I am starting portmap, nfsd and mountd on the nfs server (10.10.10.65). > > > This is my /etc/exports on 10.10.10.65: > > # $OpenBSD: exports,v 1.2 2002/05/31 08:15:44 pjanzen Exp $ > # > # NFS exports Database > # See exports(5) for more information. Be very careful: misconfiguration > # of this file can result in your filesystems being readable by the world. > > /u/data/export -alldirs -maproot=0 10.10.10.16 > > -- > > > On the client machine (10.10.10.16) : > > hq:/{190}# showmount -e 10.10.10.65 > Exports list on 10.10.10.65: > /u/data/export 10.10.10.16 10.10.10.101 Why is this different from what the server actually exports? Namely, how did 10.10.10.101 get in here? > hq:/{191}# mount -o rw -t nfs 10.10.10.65:/u/data/export /mnt/ > hq:/{192}# df -h > FilesystemSizeUsed Avail Capacity Mounted on > /dev/wd0a 509M 74.7M409M15%/ > /dev/wd0d 508M4.2M478M 1%/tmp > /dev/wd0e 3.9G2.6G1.2G69%/usr > /dev/wd0f 508M 78.9M403M16%/var > /dev/wd0g 949M2.7M899M 0%/var/log > /dev/wd0h65.0G 43.5G 18.2G70%/u > 10.10.10.65:/u/data/export 65.0G 40.4G 21.3G65%/mnt > > So far so good. Then i try to write something: > > hq:/{193}# cd /mnt/ > > > hq:/mnt{194}# cp /bin/ls ./ > > > cp: ./ls: Permission denied > hq:/mnt{195}# > > What am i doing wrong here? What are the permissions of /u/data/export on the server?
Re: doubts on NFS
On Jul 06 22:53:21, Marcos Laufer wrote: > Edd , > > This are the permissions: > > hq:/{19}# ls -al |grep mnt > drwxr-xr-x 2 root wheel 512 Nov 3 2008 mnt/ > hq:/{20}# > > I am mounting this as root . > > I also added -root=0 to /etc/exports , There is no such option. Do you mean maproot? Did you HUP mountd after you changed the config file? > still same behavior > Regards, > Marcos Laufer
Re: doubts on NFS [solved]
On Tue, Jul 07, 2009 at 12:14:07AM -0300, mar...@ipv4networks.com wrote: > I;ve just solved it . Adding this the line to /etc/fstab on the client > machine just let me mount it and write on it. > I had no need to reboot or restart anything. > > hq:/{109}# cat /etc/fstab > /dev/wd0a / ffs rw,softdep 1 1 > /dev/wd0d /tmp ffs rw,softdep,nodev,nosuid 1 2 > /dev/wd0e /usr ffs rw,softdep,nodev 1 2 > /dev/wd0f /var ffs rw,softdep,nodev,nosuid 1 2 > /dev/wd0g /var/log ffs rw,softdep,nodev,nosuid 1 2 > /dev/wd0h /u ffs rw,softdep,nodev,nosuid 1 2 > 10.10.10.65:/u/data/export /mnt ffs rw,softdep,nodev,nosuid 1 2 ^^^ should be nfs -- Olivier Cherrier - Symacx.com mailto:o...@symacx.com
Re: doubts on NFS [solved]
I;ve just solved it . Adding this the line to /etc/fstab on the client machine just let me mount it and write on it. I had no need to reboot or restart anything. hq:/{109}# cat /etc/fstab /dev/wd0a / ffs rw,softdep 1 1 /dev/wd0d /tmp ffs rw,softdep,nodev,nosuid 1 2 /dev/wd0e /usr ffs rw,softdep,nodev 1 2 /dev/wd0f /var ffs rw,softdep,nodev,nosuid 1 2 /dev/wd0g /var/log ffs rw,softdep,nodev,nosuid 1 2 /dev/wd0h /u ffs rw,softdep,nodev,nosuid 1 2 10.10.10.65:/u/data/export /mnt ffs rw,softdep,nodev,nosuid 1 2 hq:/{110}# hq:/{110}# df -h FilesystemSizeUsed Avail Capacity Mounted on /dev/wd0a 509M 74.7M409M15%/ /dev/wd0d 508M4.2M478M 1%/tmp /dev/wd0e 3.9G2.6G1.2G69%/usr /dev/wd0f 508M 78.9M403M16%/var /dev/wd0g 949M2.7M899M 0%/var/log /dev/wd0h65.0G 43.5G 18.2G70%/u 10.10.10.65:/u/data/export 65.0G 40.4G 21.3G65%/mnt hq:/{111}# umount /mnt/ hq:/{112}# mount -o rw -t nfs 10.10.10.65:/u/data/export /mnt/ hq:/{113}# > /mnt/hjdjfahjda hq:/{114}# Johan Torin escribis: > On Monday 06 July 2009, Marcos Laufer wrote: > >> Hello list , >> >> I am having trouble to make NFS work properly. I don't know what i am >> doing wrong, maybe >> someone can enlighten me. >> >> > > [config] > > >> 10.10.10.65:/u/data/export 65.0G 40.4G 21.3G65%/mnt >> >> So far so good. Then i try to write something: >> >> hq:/{193}# cd >> /mnt/ >> >> hq:/mnt{194}# cp /bin/ls >> ./ >> >> cp: ./ls: Permission denied >> hq:/mnt{195}# >> >> What am i doing wrong here? >> > > What's your protection on the mount point of the /u/data/export directory > *before* mounting the slice on it? It's not the same protection mask before > and after... > > /Johan
Re: doubts on NFS
Edd , This are the permissions: hq:/{19}# ls -al |grep mnt drwxr-xr-x 2 root wheel 512 Nov 3 2008 mnt/ hq:/{20}# I am mounting this as root . I also added -root=0 to /etc/exports , still same behavior Regards, Marcos Laufer Edd Barrett escribis: > On Mon, Jul 06, 2009 at 04:40:31PM -0300, Marcos Laufer wrote: > >> So far so good. Then i try to write something: >> > > Well, what are the permissions on the directory you are trying to write > to? Bear in mind, the user ID's (not the names) will need to be > synchronised across machines for NFS permissions to make sense. > > You might consider a YP domain?
Re: doubts on NFS
On Mon, Jul 06, 2009 at 04:40:31PM -0300, Marcos Laufer wrote: > So far so good. Then i try to write something: Well, what are the permissions on the directory you are trying to write to? Bear in mind, the user ID's (not the names) will need to be synchronised across machines for NFS permissions to make sense. You might consider a YP domain? -- Best Regards Edd Barrett (Freelance software developer / technical writer / open-source developer) http://students.dec.bmth.ac.uk/ebarrett
Re: doubts on NFS
On Monday 06 July 2009, Marcos Laufer wrote: > Hello list , > > I am having trouble to make NFS work properly. I don't know what i am > doing wrong, maybe > someone can enlighten me. > [config] > 10.10.10.65:/u/data/export 65.0G 40.4G 21.3G65%/mnt > > So far so good. Then i try to write something: > > hq:/{193}# cd > /mnt/ > > hq:/mnt{194}# cp /bin/ls > ./ > > cp: ./ls: Permission denied > hq:/mnt{195}# > > What am i doing wrong here? What's your protection on the mount point of the /u/data/export directory *before* mounting the slice on it? It's not the same protection mask before and after... /Johan
doubts on NFS
Hello list , I am having trouble to make NFS work properly. I don't know what i am doing wrong, maybe someone can enlighten me. NFS server and client are both OpenBSD 4.4 GENERIC I am starting portmap, nfsd and mountd on the nfs server (10.10.10.65). This is my /etc/exports on 10.10.10.65: # $OpenBSD: exports,v 1.2 2002/05/31 08:15:44 pjanzen Exp $ # # NFS exports Database # See exports(5) for more information. Be very careful: misconfiguration # of this file can result in your filesystems being readable by the world. /u/data/export -alldirs -maproot=0 10.10.10.16 -- On the client machine (10.10.10.16) : hq:/{190}# showmount -e 10.10.10.65 Exports list on 10.10.10.65: /u/data/export 10.10.10.16 10.10.10.101 hq:/{191}# mount -o rw -t nfs 10.10.10.65:/u/data/export /mnt/ hq:/{192}# df -h FilesystemSizeUsed Avail Capacity Mounted on /dev/wd0a 509M 74.7M409M15%/ /dev/wd0d 508M4.2M478M 1%/tmp /dev/wd0e 3.9G2.6G1.2G69%/usr /dev/wd0f 508M 78.9M403M16%/var /dev/wd0g 949M2.7M899M 0%/var/log /dev/wd0h65.0G 43.5G 18.2G70%/u 10.10.10.65:/u/data/export 65.0G 40.4G 21.3G65%/mnt So far so good. Then i try to write something: hq:/{193}# cd /mnt/ hq:/mnt{194}# cp /bin/ls ./ cp: ./ls: Permission denied hq:/mnt{195}# What am i doing wrong here? Thanks in advance for your help Regards, Marcos Laufer