-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?

1

1 Answer 1

-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.

2
  • thanks ya! wonder why this has -2 though...?
    – petergus
    Aug 14, 2012 at 18:19
  • Don't know. Share your experience or issues faced if any as comments. Aug 15, 2012 at 16:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .