I have a server (Ubuntu 16.04) where different users can put up their own Wordpress site. Some info:
- Apache runs as each user with mpm-itk.
- Users are chrooted to their home dir.
- Users can't use PHP outside their home dir.
- Permissions is apacheuser:apacheuser recursively with 755 and 644 (also tried 777)
- public_html lies within their home dir.
Subsystem sftp internal-sftp Match Group sftpusers ChrootDirectory /home/%u ForceCommand internal-sftp AllowTCPForwarding no X11Forwarding no
The users can SFTP in, upload the WP files and be on their way.
The problem comes with updating or removing plugins (adding, activate and deactivate works fine). I get the error Could not fully remove the plugin(s) akismet/akismet.php
Nothing in error logs.
Everywhere I search I get a few options:
- Install the SFTP Updater Plugin and define FS_METHOD as 'ftpsockets'. This works but I want to avoid this to keep the installation clean and the users happy. I only really admin the server, not the WP-sites themselves and forcing all users to install a plugin isn't looking good.
- Libssl/php-ssl. I get the loginprompt but it fails when trying.
- SSH keys. Think I've tried every single guide out there. The SSH session disconnects instantly. Having the same problems as this guy Wordpress SFTP auto update issues This would also confuse the users. It also gotta work for multiple PHP versions (FPM).
- define FS_METHOD as 'direct' in wp-config.php. Not working for me, same as the original error.
Anyone know what I can do to solve this? Please let me know if there's any info you need.