ProFTPD 1.3.5 AuthUserFile issue and fix

After upgrading half of my Debian servers from 7.8 to Debian 8 I’ve got some strange error while trying to start ProFTPD version 1.3.5 with AuthUserFile parameter. But previous version of ProFTPD

root@server /etc/proftpd$ service proftpd restart
Job for proftpd.service failed. See 'systemctl status proftpd.service' and 'journalctl -xn' for details.

What Did You Say?

root@server /etc/proftpd$ systemctl status proftpd.service -l
proftpd.service - LSB: Starts ProFTPD daemon
Loaded: loaded (/etc/init.d/proftpd)
Active: failed (Result: exit-code) since Fri 2015-05-22 23:39:05 EEST; 2s ago
Process: 31660 ExecStop=/etc/init.d/proftpd stop (code=exited, status=0/SUCCESS)
Process: 31668 ExecStart=/etc/init.d/proftpd start (code=exited, status=1/FAILURE)
May 22 23:39:05 server proftpd[31668]: Starting ftp server: proftpd 2015-05-22 23:39:05,703 server proftpd[31674]: mod_auth_file/1.0: unable to use world-readable AuthUserFile '/etc/proftpd/auth.passwd' (perms 0604): Operation not permitted
May 22 23:39:05 server proftpd[31668]: 2015-05-22 23:39:05,703 debian8server proftpd[31674]: fatal: AuthUserFile: unable to use /etc/proftpd/auth.passwd: Operation not permitted on line 1 of '/etc/proftpd/conf.d/auth.conf'
May 22 23:39:05 server proftpd[31668]: failed!
May 22 23:39:05 server systemd[1]: proftpd.service: control process exited, code=exited status=1
May 22 23:39:05 server systemd[1]: Failed to start LSB: Starts ProFTPD daemon.
May 22 23:39:05 server systemd[1]: Unit proftpd.service entered failed state.


After half hour of googling I’ve found that everything is alright with the config files contents. So what is going on? Why it doesn’t work?

And you know what? It was a file permissions :) Pretty obvious, you know.

Simply remove all permissions except of owner (0600) for passwd files and restart ProFTPD:

chmod 0600 *.passwd
service proftpd restart


Mount SSHFS on OS X

If you want to have a fast and secure method to work with filesystem on remote machine that has only SSH you can choose SSHFS.

Installing SSHFS on OS X Yosemite is easy — use Homebrew to install OSXFuse and SSHFS:

brew install Caskroom/cask/osxfuse
brew install sshfs

Use this command to mount root volume of remote host (remotehost:/) to your local folder /Users/me/host and also create a volume with name LocalVolumeName. It will automagically reconnect on network fails and SSH timeout.

sshfs user@remotehost:/ /Users/me/host/ -o reconnect,follow_symlinks,volname="LocalVolumeName"

You will be asked for a password of the remote system and if you don’t want do enter that password each time you can setup SSH passwordless login.

To get your remote filesystem faster you can create simple BASH script:

sshfs user@remotehost:/ /Users/me/host/ -o reconnect,follow_symlinks,volname="LocalVolumeName"

Save that as and give it execute permission:

chmod +x ./

After that you can launch your script from Terminal or Finder.
Actually, you can name it as you want (even DestroyEarth).