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

Cannot run files:compile #68

Open
lfolco opened this issue Nov 5, 2020 · 4 comments
Open

Cannot run files:compile #68

lfolco opened this issue Nov 5, 2020 · 4 comments

Comments

@lfolco
Copy link

lfolco commented Nov 5, 2020

When I try to run files:compile, I get the following error:

The command "cd /srv/public_html/releases/20201105100601 && (/usr/local/bin/php ./bin/magento setup:di:compile)" failed.

  Exit Code: 1 (General error)

  Host Name: xxxxxxxxxx

  ================

  In Write.php line 200:

    The directory "/srv/public_html/releases/20201105100601/var/cache/" cannot
    be deleted Warning!rmdir(/srv/public_html/releases/20201105100601/var/cache
    /): Not a directory


  setup:di:compile

The permissions on the symlink are drwxr-xr-x and I'm running as the directory owner.

We're using absolute symlinks, not sure if that's the issue? Running files:compile works when I do it in the context of a full deploy.

@fooman
Copy link

fooman commented Nov 10, 2020

I have seen this too. I am guessing it could be related to this change

magento/magento2@b3b80e6#diff-8e4e939ca2dbd66e3362b5a1783aa978a910c060ac5a099b51e8454556bc6febR189-R194

which doesn't like the symlink.

The error itself also happens outside of using deployer when running bin/magento setup:di:compile but the var/cache symlink seems relevant to the getRealPathSafety check.

@lfolco
Copy link
Author

lfolco commented Nov 10, 2020

That looks like a commit for 2.4, but we're on 2.3.6.

@lfolco
Copy link
Author

lfolco commented Dec 29, 2020

@fooman Have you found a workaround? I'm a bit stuck and may need to find an alternative deployment solution if I can't resolve this.

@fooman
Copy link

fooman commented Dec 30, 2020

@fooman haven't fully figured it out yet either. Need to double check but I believe just removing those directories worked for me.

set('override_shared_dirs', []);

in your deploy.php.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants