Installing pure-ftpd on Mac os x El- Capitan

As i would like to turn an Macbook OS El-Capitain as a ftp server for media exchange on my network with pure-ftpd

Replacing the build in ftp Server from OSX 10.11 with a more powerful pure-ftpd
There are many how-to for Linux user but rarely none for Mac user. The build in ftp use the System users to login in there respective home place . We want independent ftp user on a other drive for ftp use.  These is more a Log-blog on a long path of fails.

Since El Captain have his own Ftp Server we must disable it to not get in conflict with pure-ftpd

Deactivate Standard FTP-Server
sudo launchctl unload -w /System/Library/LaunchDaemons/ftp.plist


brew install pure-ftpd
brew services start pure-ftpd
sudo /usr/local/sbin/pure-ftpd

Setup ftp client to connect to ftp server on local:

brew install tnftp

Configure

/usr/local/etc/pure-ftpd.conf

After installing the Server and setting up the pure-ftpd.config i was on a hunt for some GUI Admin interface to manage the ftp user. A Solution not to old that run on these system .
Very good looks the webadmin Interface , with that you can

Make Folders for our FTP Server

mkdir   /Volumes/www/FTPshare

chmod 777   /Volumes/www/FTPshare

How to setup virtual user for ftp and group

We create a new User ftpuser and a new group ftpgroup where we add our user ftpuser

sudo dscl . -create /Users/ftpuser
sudo dscl . -create /Users/ftpuser UserShell /bin/bash
sudo dscl . -create /Users/ftpuser RealName "FTP User"
sudo dscl . -create /Users/ftpuser UniqueID "1001"
sudo dscl . -create /Users/ftpuser PrimaryGroupID 20
sudo dscl . -create /Users/ftpuser NFSHomeDirectory /Users/ftpuser
sudo dscl . -passwd /Users/ftpuser mypassword

dscl . -append /Groups/ftpgroup GroupMembership ftpuser

Dont forget to reboot to see the user in your OSx user setting to take effect

We user pure-DB for the first user Managment

PureDB user database (see README.Virtual-Users

# uncomment in pure-ftp.cpnfig following line

PureDB             /etc/pureftpd.pdb

Make db: sudo pure-pw mkdb

Restart ftp server sudo brew services restart pure-ftpd

How to change pure-ftpd user directory path?

pure-pw usermod ftpuser -d /home/ftpuser
pure-pw mkdb
Pure-PW : Manual

Get User info sudo pure-pw show ftpuser

To find a user’s UID or GID in OSX, use the id command. To find a specific user’s UID, at the terminal prompt, enter:

id -u username

Replace username with the appropriate user’s username. To find a user’s GID, at the Unix prompt, enter:

id -g username

If you wish to find out all the groups a user belongs to, instead enter:

id -G username

If you wish to see the UID and all groups associated with a user, enter id without any options, as follows:

id username

User manager for PureFTPd

A Nice Gui Web Interface for PureFTPd  from 2017 you can find here  Github 

 

Typical Problems that can occur

Permission Errors

550 Could not delete test.jpg: Permission denied

FTP  Connection Errors

550

553

Sharing & Permissions always “fetching…”?

That generally means there is an Access Control List (ACL) or POSIX permission set for a user that doesn’t exist on that system. The UID doesn’t match any of the users. Custom permissions means you have ACLs set for that item.