Www-data user does not access wp app folder


#1

Hello, I can not access the app folder of the wordpress installation with the www-data user in the fileZilla, any help?


#2

Hi!

Got the same issue, user has to have root access, any way to change this so www-data also has access?


#4

This isn’t a pretty fix but this is what I do. cd to /opt/easyengine/sites/mysite.com then I chown www-data:www-data app/ I hand over the app folder to my user www-data. Once I’m done transferring files or whatever using the www-data user, I hand back the folder to root by chown root:root app/

For a permanent fix you can use ACLs to give multiple users access to a set of folders. But the above just takes me 2 seconds to do so I never bothered with that.


#5

Is this a confirmed bug?


#6

@arrenato @Goran @msarhan @mikeslv We’ve identified the bug and created an issue for it. This will be fixed most probably in next release itself :slight_smile:


#7

Hi there,

Thank you @msarhan for your tip.

I’ve tried this myself but when I SFTP as www-data I still can’t access the app directory. I’ve set up other users and modified the permissions for the /app directory with no luck as well.

Even when ‘app’ is owned by www-data:www-data I’m still not able to access the folder. Of course I could SFTP in as root but that’s not what I’m looking to achieve, root login is disabled as default for me.

I’ve checked the ownership of /var/lib/docker/volumes/domaincom_htdocs/_data and that too is owned by www-data. I’m confused as to how this is working as a fix for you, but not for me :frowning:

@kirtan any advice?


#8

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


#9

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


#10

I reinstalled everything again
: (
Backup would be very useful


#11

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


#12

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


#13

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


#14

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


#15

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


#16

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


#17

Bump! This is a real problem :confused:


#18

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?


#19

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"

#20

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