lundi 30 mars 2015

Managing ownership of wordpress theme files whilst using gulp

I'm working on a custom wordpress theme and utilising gulp for various tasks (compiling styles, scripts etc).


I have discovered that in order for gulp to run successfully the user running the gulp command must own the directories concerned. I.e. if gulp results in a file main.css being written to the assets/css directory then I must own this directory or I get an EPERM error from npm.


A secondary concern is that if I was to inspect and perhaps edit a theme file from the wordpress admin then the directories or files must be owned by the webserver user or wordpress sees them as unwritable.


All of this is regardless of permissions.


What is the correct owner for a theme (or any other project) that might run on a webserver such that common applications such as running gulp tasks, installing npm modules or manipulating files via a web-based dashboard can be performed without encountering permission problems?


Aucun commentaire:

Enregistrer un commentaire