Opened 7 years ago

Closed 4 years ago

#6 closed Feature Request (fixed)

Fix KDE samba/NFS sharing

Reported by: tim Owned by: florian
Priority: major Milestone: 7.1
Component: Misc Version:
Keywords: Cc:


Fix KDE's support for allowing easy addition of both NFS & Samba shares to a PC-BSD system.

Change History (9)

comment:1 Changed 7 years ago by FitchKendall@…

Re: NFS File Server & Complications on PCBSD.

Tim, I know you are an expert on the items in Sections 1, 2, & 3 below which identify the usual commands to set up server & client and to mount the server. Those commands are well documented in the FreeBSD Handbook and all over the Web. Section 4 below identifies the barriers arising in PCBSD that are not covered in the Handbook.

  1. Configuring PCBSD as an NFS Server requires the "usual" commands in /etc/rc.conf:




The NFS Server gets an entry in the /etc/exports file identifying which clients can attach:

[This example exports /usr/home to everyone on the internal network]

/usr/home -network -mask

  1. The NFS Client also gets the following modifications to its /etc/rc.conf:


nfs_client_flags="-n 4"

  1. The NFS Client mounts the Server from the Terminal as root:

mount_nfs /mnt/Server1

Where is the IP of the server

/usr/home is the shared resource

/mnt/Server1 is the mountpoint on the client

(Alternatively, you can initiate the mount commands automatically in /etc/fstab.

  1. In theory that should be sufficient. Actually, however, the PCBSD client is most likely greeted with the following error message:

[udp] RPCPROG_NFS: RPC: Port mapper failure - RPC: Timed out


nfs: can't access /usr/ports/distfiles: Permission denied


nfsd: RPCPROG_NFS: RPC: Port mapper failure - RPC: Authentication error

These problems are caused by the security settings in /etc/rc.conf and /etc/hosts.allow and the firewall rules. The PCBSD firewall rules create a barrier.

/etc/rc.conf contains the following lines which turn on the firewall:



In PCBSD 1.3.4 /etc/hosts.allow contains the following code:


# Start by allowing everything (this prevents the rest of the file

# from working, so remove it when you need protection).

# The rules here work on a "First match wins" basis.

#ALL : ALL : allow

<end snip>


# Rpcbind is used for all RPC services; protect your NFS!

# (IP addresses rather than hostnames *MUST* be used here)

rpcbind : : allow

rpcbind : : allow

rpcbind : ALL : deny

<end snip>

I knew I had to change the IP addresses in the rcpbind to match my network's IPs. That was not enough. A lamer like me could not attach to the server until I turned off the firewall in /etc/rc.conf and modified the rcpbind lines in /etc/hosts.allow.

The /etc/hosts.allow file used in PCBSD 1.4 Beta is different from the one in 1.3.4. For 1.4, turning off the firewall and changing the rcpbind lines were not enough. I had to activate the early line in /etc/hosts.allow that says ALL : ALL : allow.

In summary, in order to let PCBSD client attach to a PCBSD NFS Server, the firewall rules and hosts.allow must be adjusted.

comment:2 Changed 7 years ago by tim

  • Owner changed from tim to florian

Changed owner, Florian wants to take care of this.

comment:3 Changed 6 years ago by florian

I need to bail on this. I had very few time to get it working, even less to test it. Mostly because of private issues and the lack of hardware. Once I am up to date and more free I will get it working. Even though I believe it won't matter anymore since KDE 4.0 is then on its way.

comment:4 Changed 6 years ago by kris

  • Milestone changed from 1.5 to 2.0

comment:5 Changed 6 years ago by florian

How is the state of this in KDE 4.X? Does it come with some sort of sharing manager or needs it to be completly written from scratch?

comment:6 Changed 6 years ago by kris

That module is still in KDE4, but it does look like it may need some work still. (Tested it on 4.1RC1) It exists, but some of the permissions stuff needs work, it isn't prompting properly for the root PW when I want to share a folder via samba, since it needs to update smb.conf

comment:7 Changed 6 years ago by florian

Alright. I will try to look into that one when time permits.

comment:8 Changed 6 years ago by kris

  • Milestone changed from 7.0 to 7.1

Switched milestone to 7.1. Will you still be able to look into this Florian?

comment:9 Changed 4 years ago by kris

  • Resolution set to fixed
  • Status changed from new to closed

Closing this because of inactivity. Should probably be on the freebsd-kde team site now.

Note: See TracTickets for help on using tickets.