0

So, I've got my LB all set squared away and running well (all ubuntu servers, sitting on a ubuntu host machine).

Everything works... syncing files, loading the sites, backups, etc...

They are a total of 6 VM's on my local server (4 web, 1 lb, 1 db).

Issue that I am having now is figuring out a way I can work on the sites.

Well... not so much an issue, more of a hinderance...

As long as I shell into the primary web server and chown to my user and group, there is no issue working on the sites... other than that they will not display due to the permissions change from www-data to my user account. Unless I chown to my user:www-data... however, when I do this, I am no longer able to manage the sites through their admin interface due to the user permissions (they are all wordpress sites).

Once I finish working on them, I can chown them back to www-data:www-data, and thus am able to work on the WP side....

While this is fine and dandy while I am sitting in front of the host machine, this is not feasible outside my local network (due to me limiting shell access to my local machines only)

What I am wondering is if there is a way around this?

I've tried adding my user account to the www-data group, adding the www-data user to my group, and still, I have to do this "work around"

Kevin
  • 133
  • 1
  • 2
  • 14
  • 1
    Add your user to the www-data group and chomod the files so that they have group write permission. Better yet, when you're working from shell before adding files there do a: chgrp www-data – Fredi Jan 07 '16 at 15:19
  • aye, did that.(the user to group) tho not sure how to add `group write permissions` – Kevin Jan 07 '16 at 20:07
  • 1
    chmod -R g+w DIRECTORY – Fredi Jan 08 '16 at 11:27
  • I'll get back to you in a bit about this. I'm now having an issue updating my php7 install lol.... if it aint one thing it's another... – Kevin Jan 08 '16 at 15:34
  • Awesome mate... worked like a champion! Can you add it as an answer, so I can accept :D – Kevin Jan 08 '16 at 16:23
  • just posted my reply – Fredi Jan 08 '16 at 19:04

1 Answers1

1

Add your user to the www-data group and chomod the files so that they have group write permission, here's the command:

chmod -R g+w DIRECTORY

Better yet, when you're working from shell before adding files there do a: chgrp www-data so files get created with apache's group.

Fredi
  • 2,257
  • 10
  • 13