How to update WordPress source files safely?

Hi guys,

Can anyone please help me with how to update WordPress source files safely without running into any potential permissions issues?
Basically we want to edit a few theme and plugin files for our website.

Thanks!

You can edit files directly as root and the files won’t change it’s ownership but only if the file was made by the originally user first. For Debian based distros, www-data is the user and owner, which is what EEv4 is using as the host OS.

The EasyEngine way is to drop into that sites shell and edit your files there.

sudo ee shell mysite.com

You will not run into any user or permission errors there.