LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 01-07-2007, 03:43 PM   #1
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Rep: Reputation: 32
nfs share: permission denied


Hi all,

I am trying to mount a BSD share on a Linux (FC6) box. Here is the line in /etc/exports on my freeBSD 6.1 box (juno):
Code:
/home/krop     -maproot=root   -rw     192.168.1.11
/etc/hosts.allow I have (temporarily) made ALL : ALL : allow

On BSD, I run /etc/rc.d/mountd onereload. On the Fedora box, I run in sudo mount -v juno:/home/krop /mnt/juno but I keep getting:
Code:
mount: juno:/home/krop failed, reason given by server: Permission denied
What I am missing?
 
Old 01-08-2007, 12:26 PM   #2
Vincent_Vega
Member
 
Registered: Nov 2003
Location: South Jersey
Distribution: Slackware, Raspbian, Manjaro
Posts: 826

Rep: Reputation: 31
On the BSD machine you need to have your exports entry showing the directory you're allowing access to and with what permissions, etc.
Is the ip address you give permissions correct for your FC machine?
Is 'juno' listed in your hosts file? If not, you might need to use the ip address of the BSD machine instead of it's name.
 
Old 01-08-2007, 05:39 PM   #3
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Original Poster
Rep: Reputation: 32
No, it isn't a problem with hostnames. mount gives a different error message if you try to mount a share from a nonexistent host.
 
Old 01-08-2007, 06:12 PM   #4
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
Are you sure the Fedora box's ip is 192.168.1.11?

Examine the logs, run nfsd, mountd and rpcbind in debug mode if you need more verbose logging

EDIT: One thing thats just come to mind, is /home a symlink to /usr/home, if so you need to export /usr/home/krop

Last edited by phil.d.g; 01-08-2007 at 06:14 PM.
 
Old 01-09-2007, 06:57 AM   #5
bhart50
LQ Newbie
 
Registered: Jan 2007
Posts: 7

Rep: Reputation: 0
Is the Fedora server in DNS or the hosts file of the BSD server? If you do a showmount does the bsd server already show the Fedora server as mounted? If neither of these work try changing the address on the fedora box and see if it will mount.
 
Old 01-09-2007, 05:08 PM   #6
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Original Poster
Rep: Reputation: 32
@Phil.d.g: yes I am sure the IP of the Fedora box is correct. I have also tried this in /etc/export to no avail:
Code:
/home/krop     192.168.1.0/255 (rw)
How does one run nfsd, mountd and rpcbind in debug mode? Nothing about that in the man pages.

@bhart50: the Fedora box is in the /etc/hosts file of the BSD server, but I am using just IP numbers right now. Changing the IP number of the Fedora box had no effect. Showmount on the BSD box returns nothing.


I am trying to remember the gotchas from the first time I set up NFS. One was the hosts.allow file. The other was UID/GIDs. With the respect to the latter, I consciously have the same username @ 500:500 on all my systems. Still, I must be missing something else...

Last edited by Kropotkin; 01-09-2007 at 05:19 PM.
 
Old 01-09-2007, 05:27 PM   #7
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
mountd and rpcbind can be run in debug mode using the -d flag, this is in the man pages for 6.1 at least.

I'm a bit hazy with this part, but I think if you run nfsd from a terminal without backgrounding it then I think it will log verbosely to the screen.

The one thing that got me when I used nfs was that on FreeBSD you can't use symlinks or relative paths in the export path

Last edited by phil.d.g; 01-09-2007 at 05:28 PM.
 
Old 01-09-2007, 05:52 PM   #8
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by phil.d.g
mountd and rpcbind can be run in debug mode using the -d flag, this is in the man pages for 6.1 at least.
Weird, the man page seems to be there, but I can't open it:

Code:
$ locate rpcbind
/etc/rc.d/rpcbind
/usr/sbin/rpcbind
/usr/share/man/man3/rpcbind.3.gz
/usr/share/man/man8/rpcbind.8.gz

$ man rcpbind
No manual entry for rcpbind

$ man 3 rcpbind
No entry for rcpbind in section 3 of the manual

$ man 8 rcpbind
No entry for rcpbind in section 8 of the manual

$ man -k rcpbind
rcpbind: nothing appropriate
I stand corrected: the mountd manpage does list the -d option.

Quote:
The one thing that got me when I used nfs was that on FreeBSD you can't use symlinks or relative paths in the export path
I've run into symlink issues with NFS under Linux as well.

Last edited by Kropotkin; 01-09-2007 at 05:53 PM.
 
Old 01-09-2007, 06:13 PM   #9
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Original Poster
Rep: Reputation: 32
SOLVED, thanks phil.d.g

Running mountd with the -d flag, it writes error messages to /var/log/messages. This enabled me to see it didn't like the -rw flag I was using in the exports file. Nor did it accept 192.168.1.0/255 for hosts; I have to list a range of IPs like this:

Code:
192.168.1.11 192.168.1.12 192.168.1.13
UPDATE hostnames (ie, juno) now also work.

Last edited by Kropotkin; 01-09-2007 at 06:15 PM.
 
Old 01-09-2007, 06:43 PM   #10
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Original Poster
Rep: Reputation: 32
One hiccup yet remains. When I try to export a directory like /usr/local/www, this gets written to /var/log/messages:
Code:
mountd: got line /usr/local/www ariel zeus
mountd: found ep fs=0x32c9b0a5,0xd379d0de
got host ariel
got host zeus
mountd: can't change attributes for /usr/local/www
Anyone know what this error message means? I searched with Google but it didn't turn up any obvious answers.

UPDATE Never mind, solved as well. Multiple directories from same FS in the same line. It's all in the man pages, if you read closely ...

Last edited by Kropotkin; 01-09-2007 at 06:53 PM.
 
Old 01-10-2007, 04:20 AM   #11
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
The man pages are wonderful arent they?

Just a note: you don't need to specify all the individual ip addresses, you can specify a network using the -network and -mask flags, for example:
Code:
/home/krop     -maproot=root -network 192.168.1.0 -mask 255.255.255.0
 
Old 01-10-2007, 08:15 AM   #12
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Original Poster
Rep: Reputation: 32
Thanks for the network address tip.

One thing I am having problems with: root permissions. I can edit files in my home directory but when when I try to edit a file owned by root, it is opened read-only.

I have added the -maproot flag to map root to my username, but that doesn't seem to do the trick. Even as root the Linux box (su - or sudo), files are opened read-only on the BSD share.

Could it a group issue? Neither root nor my username is a member of the "wheel" group BSD uses. Or something else?...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
nfs permission denied noir911 Linux - Networking 1 06-09-2006 04:04 AM
Mounting an nfs share - Permission Denied doctorwebbox Linux - Networking 5 05-30-2005 01:45 AM
nfs 'permission denied' friendly_guy Slackware 7 01-02-2005 07:24 PM
Permission Denied NFS graystarr Linux - Networking 9 07-08-2002 05:06 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 09:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration