LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-15-2012, 11:38 PM   #1
anctop
Member
 
Registered: Feb 2010
Posts: 99

Rep: Reputation: Disabled
NFS : how to specify a port number for rpc.statd ?


My system has been running nfs-utils-1.2.0 for a few years.
Recently I proceed to upgrade to the latest nfs-utils-1.2.5.

My configure options are "--disable-nfsv4 --disable-nfsv41 --disable-gss --disable-uuid --enable-mount --enable-shared --with-statduser=statd --with-rpcgen=internal --without-tcp-wrappers".
There is no problem in building it, but rpc.statd refuses to start.

The (server) startup steps are :

1. mount -t nfsd /proc/fs/nfsd
2. exportfs -av
3. rpc.mountd -p 1011
4. rpc.statd -o 1013 -p 1014 --no-notify

At this point, rpc.statd fails. The syslog says

> rpc.statd[875]: Version 1.2.5 starting
> rpc.statd[875]: Flags:
> rpc.statd[875]: Could not bind name to socket: Permission denied

The same steps worked well for the old version.
It is started by root in the init script and I'm sure that all the ports (tcp & udp) 1011, 1013 & 1014 are available on my system.

Then I've tried different combinations of values for -o and -p, found that the port number for -p must be at least 1024.
It seems that -p requires an un-privileged port, but there is no mention in the ChangeLog's of the releases from 1.2.1 through 1.2.5.

Since the daemons will run along with a firewall, is there any way to make rpc.statd listening on the specified ports ?
 
Old 04-16-2012, 05:14 AM   #2
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Is SELinux in enforcing mode on your machine?
If yes, try putting it in permissive mode.
If it works, then add SELinux manage rules to allow rpc.statd to listen on required ports, and then put SELinux back in enforcing mode.
To start give the output of
Code:
sestatus
 
Old 04-16-2012, 07:54 PM   #3
anctop
Member
 
Registered: Feb 2010
Posts: 99

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tshikose View Post
Is SELinux in enforcing mode on your machine?
If yes, try putting it in permissive mode.
If it works, then add SELinux manage rules to allow rpc.statd to listen on required ports, and then put SELinux back in enforcing mode.
To start give the output of
Code:
sestatus
Thanks for your hint.

As far as I know, I'm not using SELinux features and "sestatus" is not yet available on my system.
It was initially a LFS system installed some years ago, but with constant kernel & packages updates.
The current kernel is version 2.6.39.2 . The SELinux-related kernel configs are just the defaults :

Code:
# Security options
#
CONFIG_KEYS=y
# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
# CONFIG_SECURITY_DMESG_RESTRICT is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITYFS is not set
# CONFIG_DEFAULT_SECURITY_SELINUX is not set
CONFIG_DEFAULT_SECURITY_DAC=y
CONFIG_DEFAULT_SECURITY=""
CONFIG_CRYPTO=y
What else to check for problems ?
 
Old 04-17-2012, 02:15 AM   #4
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi,

I am sorry, but I haven't really any hint.
Can you have a look at the log files while trying to launch the service?
 
Old 04-17-2012, 02:52 AM   #5
anctop
Member
 
Registered: Feb 2010
Posts: 99

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tshikose View Post
Hi,

I am sorry, but I haven't really any hint.
Can you have a look at the log files while trying to launch the service?
I've mentioned the log contents in the first post :

> rpc.statd[875]: Version 1.2.5 starting
> rpc.statd[875]: Flags:
> rpc.statd[875]: Could not bind name to socket: Permission denied

It can start if the value of -p is at least 1024.
I guess the nfs-utils developers should have changed something in rpc.statd, but I can't find where this is documented.
Also, I'd like to know if some hack on the codes can restore its original behaviour.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
rpc.statd: Running as root. chown /var/lib/nfs to choose different user catkin Slackware 11 01-10-2013 08:55 AM
NFS Locking problem: starting "rpc.statd " gives error message opmetc Linux - Networking 2 11-16-2009 02:58 AM
NFS RPC: Port mapper failure - RPC: Unable to receive KEJP Linux - Networking 6 12-18-2006 02:14 AM
rpc.lockd & rpc.statd twantrd Linux - General 1 05-21-2005 09:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:01 AM.

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