Server directory Deployment Error

In an attempt to implement continuous integration into our DEV environment within my project , I have integrated my SC deployment process with git and jenkins, I have had to change the owner of the server directory and files (local) to www-data , I have added the “daemon” user that scriptcase uses to deploy to the www-data group.

When I do a typical deployment to a local server directory, I get the following error “deployment error could not be copied! Error: File” , This is a directory/file permission error I assume .

obviously SC is the weakest link in the pipeline… Manual deployment using SC to local folder, Git commit , auto remote deploy to dev using jenkins, --> test -->production

Again SC lacks proper apis to use to integrate with any development lifecycle or pipeline tool

Is there a way to Script/automate a SC deployment or at least change the user SC uses to deploy to a local server directory ?

I found this in the knowledge base:
https://client.scriptcase.host/knowl…your-host.html

but it assumes Im using my own user, which i’m not because of apache

UPDATE
Seems that my workstation required a reboot after adding the daemon user to the www-data group that has write permissions (not SC related)

The deployment now seems to complete but still getting the following error:
fclose() expects parameter 1 to be resource, boolean given | Script: /opt/NetMake/v9/wwwroot/scriptcase/devel/class/page/nmPagePublishWizard.class.php linha: 1599

Which has helped pointing me in the right direction with regards to scripting/automating the deployment…

Is there a way to execute the deployment from the command-line using :

$ php /opt/NetMake/v9/wwwroot/scriptcase/devel/class/page/nmPagePublishWizard.class.php parameter1 parameter2 etc ?