Www-data user does not access wp app folder

I did not understand the resolution, I have the same problem.

/opt/easyengine/sites/www.mysite.com/app: open for read: permission denied

I reinstalled everything again
: (
Backup would be very useful

What username are you logging in to SSH & SFTP with?

Any updates on how to fix this. my website is down. Do I have to rebuild my server? Whats the resolutions?

Doesn’t work. Still cant get to the folder.

mroth911@computer : /opt/easyengine/sites/site.com $ sudo chown www-data:www-data app/

mroth911@computer : /opt/easyengine/sites/site.com $ cd app/

-bash: cd: app/: Permission denied

You also need to do the following to allow your user to access that directory:

chmod g+x /var/lib/docker/volumes
chgrp www-data /var/lib/docker/volumes


For more security, replace www-data with a high-level group that only your site administrators use, like admin, wheel or sudo.

In ubuntu you can add the user to a group with: usermod -aG examplegroup exampleusername

2 Likes

I am having this same issue, anyone have any ideas how to get around this till the bug is fixed?

Bump! This is a real problem :confused:

Same issue here, going to chown group as writable on wp-contents folder but this seems wrong. Is PHP-FPM not running as www-data?

Ah crap, i fyou use the --vip flag , it will install some filesystem thing that prevents writes. Look at your php error logs


2019/02/05 01:52:26 [error] 6#6: *1691 FastCGI sent in stderr: "PHP message: PHP Warning:  The `/var/www/htdocs/wp-content/upgrade/parler-9kBdjw` file cannot be managed by the `Automattic\VIP\Files\WP_Filesystem_VIP` class. Writes are only allowed for the `/uploads` and `/tmp` directories and reads can be performed everywhere. in /var/www/htdocs/wp-content/mu-plugins/files/class-wp-filesystem-vip.php on line 65
PHP message: PHP Warning:  The `/var/www/htdocs/wp-content/upgrade/parler-9kBdjw` file cannot be managed by the `Automattic\VIP\Files\WP_Filesystem_VIP` class. Writes are only allowed for the `/uploads` and `/tmp` directories and reads can be performed everywhere. in /var/www/htdocs/wp-content/mu-plugins/files/class-wp-filesystem-vip.php on line 65" while reading response header from upstream, client: 69.194.135.243, server: www.bitabout.com, request: "POST /wp-admin/admin-ajax.php HTTP/1.1", upstream: "fastcgi://172.26.0.4:9000", host: "www.bitabout.com", referrer: "https://www.bitabout.com/wp-admin/plugin-install.php?s=parler&tab=search&type=term"

https://github.com/Automattic/vip-go-mu-plugins/issues/1054 - solution at bottom

How is this still an issue! This was opened in DEC!

I just setup a new server with the latest version of EE and still I have the issue that the www-data user can’t access or make changes in the /var/lib/docker/volumes/examplecom_htdocs/_data folder. Does anyone have a fix for this?

Not sure I see the fix you are talking about.

It looks like this issue is still unresolved. Is there an ETA on this or a work around?

Same problem here. This is crucial, please fix this or let us know how to handle this!

cheers

There is a lot of confusion for people on the new EE4 because it uses docker containers. Short and sweet, without getting into the details of how docker works, because I am still a n00b at it as well, your www-data user doesn’t have access because the container itself has its own www-data user with the correct rights to do everything it needs to do. If you need to setup SFTP access for a user into the website’s data folder just follow these instructions. Configure SFTP on EE4 server. You can create a user (not www-data) with SFTP access that will have full rights to do add, edit, delete, etc.

Hopefully, most of the people experiencing issues with this will see this post.

thank you!
it works… yes for security reason I added a new user.