-2

I like to stay logged into my (Ubuntu) VPS as root. Now I am running into issues when I git pull into my wordpress directory at /home/user .

All new files will have user and group assigned as "root", but it will not work in wordpress unless they are owned by "user".

So either wordpress should be able to run with files who have root ownership, or somehow the wordpress directory should automatically chown when I pull. Is it possible?

Is there something I can do, so that I am not forced to always chown or su - user?

Jonas Stein
  • 406
  • 5
  • 14
petergus
  • 121
  • 4

1 Answers1

-2

Its not a good practice to run as root always. Create a non privileged user and use sudo to access root privileges.

Regarding ownership, simplest way is to add a cron job to change permissions every minute. But it is a dirty fix. Use a non privileged user always.

Anish Sheela
  • 192
  • 2
  • 16