title: Jenkins deploy www-data and jenkins user permissions
body: <p>I've set up a basic Laravel deploy workflow with Jenkins. Everything works fine except the chwon / chmod commands that run after the build.</p>
  <blockquote>
  <p>chmod: changing permissions of ‘/var/www/html/projectname/storage/framework/sessions/dc164af49acb0c9229fff8d75fb381a87e4bb3fa’: Operation not permitted</p>
  <p>chown: changing ownership of ‘/var/www/html/projectname/node_modules/resolve/test/node_path/y/bbb/index.js’: Operation not permitted</p>
  </blockquote>
  <p>I've checked that those files ownership belongs to www-data user. But how can I change the builded file ownership or how can I set up Jenkins to build files with another user?</p>
  <p>I've already tried setting the user variable in etc/default/jenkins file but that does not help either.</p>