I have installed wp-cli for WordPress on a LAMP server and the wp --info reports normal functioning, but I do not have permissions when I try to perform commands such as wp plugin update.
You will need to add the user in question to the apache group.
sudo adduser username www-data
Then you will need to modify the user permissions
sudo usermod -a -G www-data username
www-data is a typical group for apache. You may need to use a different group depending on your requirements.
This question has a good answer about the the usermod flags: unix.stackexchange.com/questions/608822/
I am not affiliated with wp cli or WordPress. I came to this solution through searching, asking, tiral and error.
December 29, 2023
Turbo Multi-language Translator
Make the better internet purchasing globaly
Turbosify SEO Speed Booster
5.0 (7)•Free plan available
Get better conversions by improving store loading speed
Installed
Turbo Multi-language Chat - AI Customer service in one hand
December 29, 2023