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

Unable to access app directory by non-root user #1340

Open
kirtangajjar opened this issue Dec 7, 2018 · 11 comments

Comments

9 participants
@kirtangajjar
Copy link
Contributor

commented Dec 7, 2018

Non-root users are unable to access app/ directory in site due to ownership/permission issues. See -

https://community.easyengine.io/t/www-data-user-does-not-access-wp-app-folder/11578
https://community.easyengine.io/t/sftp-for-eev4-not-able-to-access-wordpress-installation-directory/11560

This needs to be fixed by setting correct file permissions.

@kirtangajjar kirtangajjar added this to To Do in v4 Maintenance Releases via automation Dec 7, 2018

@mrrobot47 mrrobot47 moved this from To Do to Backlog in v4 Maintenance Releases Jan 14, 2019

@Code-Bear

This comment has been minimized.

Copy link

commented Jan 17, 2019

Why was this put on the backlog? This seems to be affecting a lot of people, myself included. Can you explain the steps required to manually fix this until the bug is fixed?

@alexlii1971

This comment has been minimized.

Copy link

commented Jan 22, 2019

Hello,

Here is another issue,

https://community.easyengine.io/t/how-to-enable-view-details-of-plugins-on-subsites-of-wordpress-multisites/12007

and I am not sure these two issue is related.

But if not, it would be highly appreciated if you could help.

Thanks

@huuphongnguyen

This comment has been minimized.

Copy link

commented Jan 22, 2019

I also cannot access to edit wordpress file into it. But I have another solution:
First, I come directly sudo /opt/easyengine/sites/example.com
After that, sudo ee shell example.com
And now you can list all of Wordpress source file. Let's edit it, for example, vim wp-config.php. Edit and :x to edit.
That's all

@Divaksh

This comment has been minimized.

Copy link

commented Jan 28, 2019

Is there any workaround to access app/ directory via SFTP?

@Code-Bear

This comment has been minimized.

Copy link

commented Jan 28, 2019

@Divaksh you can use your root user with SFTP till this is resolved. I know it is a bad idea but it is the easiest option unless you are going to change the permissions for all the files and folders for the www-data users so it has the correct access and permissions.

@scotthill04210

This comment has been minimized.

Copy link

commented Feb 2, 2019

Any progress, I'm have same problem logging in as root.

@Divaksh

This comment has been minimized.

Copy link

commented Feb 4, 2019

@kirtangajjar could you label it with "good first issue"?

@mbtamuli

This comment has been minimized.

Copy link
Member

commented Feb 4, 2019

Here are the steps to setup SFTP as a workaround for now.

  1. Generate encrypted password.
echo -n "your-password" | docker run -i --rm atmoz/makepasswd --crypt-md5 --clearfrom=- | sed 's/\$/$$/g'
  1. Create the SSH host key
ssh-keygen -t ed25519 -f ssh_host_ed25519_key < /dev/null
ssh-keygen -t rsa -b 4096 -f ssh_host_rsa_key < /dev/null
  1. Create the following docker-compose.yml.
sftp:
    image: atmoz/sftp
    restart: on-failure
    volumes:
        - /path/to/target/directory/:/home/<user>/upload
        - /path/to/sftp-keys/ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key
        - /path/to/sftp-keys/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key
    ports:
        - "2222:22"
    command: '<user>:<encrypted_password_from_step_1>:e:<user_id_of_user_on_host>'
  1. Start the container.
docker-compose up -d

We'll be adding it to the EasyEngine blog soon.

@codente

This comment has been minimized.

Copy link

commented Mar 6, 2019

Can someone clarify if this is the "blog" you were referring to? I've attempted this several times and it fails for me: https://easyengine.io/handbook/configure-sftp-on-ee4-server

Others are reporting the same in the forum

@motyl1338

This comment has been minimized.

Copy link

commented Jun 27, 2019

Any other solution for it ?

@Code-Bear

This comment has been minimized.

Copy link

commented Jul 10, 2019

How is this issue still unresolved?! Does anyone have a fix for this? I see @mbtamuli comment about setting up a docker container but I am using a VPS on digital ocean and it comes pre-setup with an SSH and I am unable to get this option to work. I am not sure if it is because of the default setup of the VPS but I have tried following those steps serval times without success and when I set up my sftp access the normal way through the existing setup I am unable to access the app folder with my www-data user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.