Search code examples
ftpcentosarchlinuxproftpdcurlftpfs

cURLFTPFS refuses to mount root directory


I'm trying to have full access to my CentOS8 VPS (ie accessing root directory /) through a mounted cURLFTPFS directory on my local Archlinux system. However no config seems to allow me to mount anything other than the user's home directory (/home/admin).

I've tried all combinations of:

  • Setting the line DefaultRoot / admin in /etc/proftpd.conf
  • Setting the line DefaultChdir / in /etc/proftpd.conf
  • Mounting with curlftpfs vps.example.com mountpoint
  • Mounting with curlftpfs vps.example.com/ mountpoint
  • Mounting with curlftpfs vps.example.com// mountpoint
  • Mounting with curlftpfs vps.example.com:/ mountpoint
  • Mounting with curlftpfs vps.example.com:// mountpoint

Preemptive responses:

  • I'm using ProFTPD
  • The user I'm connecting with is admin
  • Login details are set in .netrc
  • I'm not using a VirtualHost in the proftpd config file.
  • I am not forgetting to systemctl reload proftpd

Any advice would be highly welcomed.


Solution

  • I have found the problem and it's as dumb as can reasonably be expected.

    By default, ProFTPD locks all users to home directories except for the adm group. This overrides all other access controls.

    All I had to do was change the line DefaultRoot ~ !adm (which his hidden amongst lines of comments in /etc/proftpd.conf) to DefaultRoot ~ !adm,!admin.