[Labs-l] Deploying files tools.wmflabs.org: this could be simpler, right?

Tim Landscheidt tim at tim-landscheidt.de
Tue Apr 15 13:00:14 UTC 2014


(anonymous) wrote:

> i'm having a bit of a hard time deploying my files on tools. Maybe
> some of you might be able to help. I've got nothing complicated, just
> a git repo with some PHP files. I've got a shell name called 'hay' and
> a tool account with the same name. When i developed some stuff on my
> local machine my current route to deploy it is something like this:

> 1) rsync all of my files to my tools account
> 2) cp all of these files to /data/project/hay. Unfortunately this
> doesn't work because of permission errors, so this means i've got to:
> 3) 'become hay'
> 4) rm -rf all the files in 'public_html' and 'lib' (a folder with some
> common libraries).
> 5) Logout as 'hay'
> 6) cp all of the transferred files to /data/project/hay
> 7) 'become hay' again
> 8) Now i can 'take *' for all of these files
> 9) I've got some config files that i can't overwrite, so i copy these
> by hand from the tool account to the correct directories.

> And them i'm done. 9 steps seems like a lot just to deploy some PHP
> files to a webserver. Obviously, there should be some easier way to
> manage this, right?

Besides Pietro's advice which I use myself for some tools,
in general you as your user account can read and write files
under your tool's directory because the latter's group owner
is the tool's group (in your case tools.hay).  *But* for
that to work, directories must be group-writable.  However,
you changed the permissions for example for
/data/project/hay/public_html to drwxr-sr-x, which means
that your user account cannot write to that directory.

To fix that, you can, as your tool account, "chmod -R g+w
/data/project/hay" to make all files and directories in your
tool's directory and its subdirectories writable by other
members of the respective group.

Tim




More information about the Labs-l mailing list