LEMP stack on digitalocean VPS.
I haven't been able to get "wp core update" to work unless public (or "Other") has execute permission, i.e. 757 or 777.
Otherwise, it throws "Error: Could not create directory" every time.
I checked that the user who owns the wordpress install is the same user running "wp core update"
Things I've attempted so far are setting permissions to 775, chown www-data:www-data, moving the wp-cli file.
I have multiple websites running on this droplet/server, and each experience the same problem.
So, let's say I set a cronjob to set permissions to 757, update, and set back to 755 directories 644 files 660 wp-config.php
Is that relatively safe to do? Would I be putting my clients' sites in considerably jeopardy doing this?