-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
@wordpress/env: Use user with UID=33 to run WP CLI commands #20403
@wordpress/env: Use user with UID=33 to run WP CLI commands #20403
Conversation
The www-data user in wordpress:cli has a different UID (82) to the www-data user in wordpress (33). Ensure we use the wordpress www-data user for CLI commands. See docker-library/wordpress#256 for more discussion.
Size Change: 0 B Total Size: 864 kB ℹ️ View Unchanged
|
It looks like there's a similar but unrelated issue with media uploads failing when |
I wonder if this will help with the other permissions error @ockham mentioned |
Thanks! Confirming that this fixes the issue that (Noah and) I were running into -- so I can, once again, run ~/src/gutenberg$ npx wp-env start
✔ WordPress started. (in 958s 579ms)
~/src/gutenberg$ npx wp-env stop
✔ Stopped WordPress. (in 5s 506ms)
~/src/gutenberg$ npx wp-env start
✖ EACCES: permission denied, open '/home/me/wp-env/6ac6b03bd54e5e922f0d180f6d7ff25d/tests-WordPress/wp-config.php'
[Error: EACCES: permission denied, open '/home/me/wp-env/6ac6b03bd54e5e922f0d180f6d7ff25d/tests-WordPress/wp-config.php'] {
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/home/me/wp-env/6ac6b03bd54e5e922f0d180f6d7ff25d/tests-WordPress/wp-config.php'
} |
It's honestly a little bit funny that it doesn't work the second time. Very strange. :) |
The www-data user in wordpress:cli has a different UID (82) to the www-data user in wordpress (33). Ensure we use the wordpress www-data user for CLI commands. See docker-library/wordpress#256 for more discussion.
The www-data user in wordpress:cli has a different UID (82) to the www-data user in wordpress (33). Ensure we use the wordpress www-data user for CLI commands. See docker-library/wordpress#256 for more discussion.
Follows #20352. Fixes the issue described in #20180 (comment).
The
www-data
user inwordpress:cli
has a different UID (82) to thewww-data
user inwordpress
(33). This change ensures we use thewordpress
www-data
user for CLI commands.This only is an issue when
"core"
in.wp-env.json
is set tonull
, because this means that we're using a volume mount instead of a bind mount. Files in a bind mount have the same permissions as they do on the host system.See docker-library/wordpress#256 for more discussion on this.
cc. @noahtallen @epiqueras