Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing plugin fails to create folder (vsftpd and Loco) #397

Closed
flaviops opened this issue Apr 22, 2019 · 2 comments
Closed

Installing plugin fails to create folder (vsftpd and Loco) #397

flaviops opened this issue Apr 22, 2019 · 2 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@flaviops
Copy link

Hi,

I'm having issues when installing the Loco plugin to my Wordpress.

The plugin requires a ftp server, so I installed vsftpd on my host machine using the following tutorial: Link

The configuration file is the same as the tutorial (/etc/vsftpd.conf):

listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
pasv_enable=Yes
pasv_min_port=10000
pasv_max_port=10100
allow_writeable_chroot=YES

When I click the "Install Now" button, insert the IP, user and password for ftpuser it shows the following error:
image

Upon inspecting the vsftpd log (/var/log/vsftpd.log) I saw this error:

[ftpuser] FAIL MKDIR: Client "::ffff:172.23.0.3", "/docker_volumes/wordpress-container/html/wp-content/plugins/loco-translate"

Some lines prior it seems that the ftpuser have permission to write on some directories:

[ftpuser] OK MKDIR: Client "::ffff:172.23.0.3", "/docker_volumes/wordpress-container/html/wp-content/upgrade/loco-translate.2.2.2-uCh8VE/loco-translate/tpl/debug"

I have tried to change the directory permissions, which resulted in the same error:

drwxrwxrwx 16 www-data www-data 4.0K Apr 22 11:54  plugins
drwxrwxrwx  2 www-data www-data 4.0K Apr 12 16:22  upgrade

Am I missing some configuration or I'm using the ftp wrongly?

Thanks.

@flaviops flaviops changed the title Installing Loco plugin fails to create folder (vsftpd) Installing plugin fails to create folder (vsftpd and Loco) Apr 22, 2019
@wglambert wglambert added the question Usability question, not directly related to an error with the image label Apr 22, 2019
@wglambert
Copy link

#298 (comment)

if you're getting prompted for FTP credentials, it's because of your filesystem permissions. I think you'll find that if you correct the filesystem permissions, the prompt will go away and installations will complete successfully automatically within the Web UI (since the www-data user that the PHP code runs as needs to be able to write to the directories in order for the web-based installation to succeed).

I was able to install it through the webui using this docker-compose file

version: '3.1'

services:

  wordpress:
    image: wordpress
    restart: always
    ports:
      - 8080:80
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: exampleuser
      WORDPRESS_DB_PASSWORD: examplepass
      WORDPRESS_DB_NAME: exampledb

  db:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_DATABASE: exampledb
      MYSQL_USER: exampleuser
      MYSQL_PASSWORD: examplepass
      MYSQL_RANDOM_ROOT_PASSWORD: '1'

Spectacle Et1169

@flaviops
Copy link
Author

Hi @wglambert,

I notice that I had added the following line to my wp-config.php and it was the cause for my problem:

define( 'FS_METHOD', 'ftpext');

Replacing ftpext by direct as pointed by #298 (comment).

Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

2 participants