hasanen / wpcli

Simple wrapper for wp-cli (http://wp-cli.org/).
MIT License
5 stars 1 forks source link

Running block under another user fails check for running as root #3

Closed zvanderbilt closed 7 years ago

zvanderbilt commented 7 years ago

This might be a personal problem, but I have some code I wrote to iterate through a directory filled with wordpress installs, and then execute some wpcli stuff within each directory. Problem is I need to run the iterator part as root or at least a privileged user and I would prefer not to use --allow-root option on the wpcli commands as that tends to muck things up on the site, screwing with ownership and the like. Anyways I attempted to overcome this by running the wpcli blocks as another user, namely the owner of the docroot, which works. The issue is wp-cli checks for the uid of the running script which is often root and thus still fails the root check. Anyway to overcome this via the wpcli gem or should I mention this at the main wp-cli repo?

hasanen commented 7 years ago

This sounds like an issue in the wp-cli side. And as I don't develop this anymore, you get better help from there.