I'm having issue similar to this: How to copy files as Jenkins "post build" action if i don't have privileges to destination directory
I'm willing to move/copy/rsync files from jenkins workspace to
/var/www/app
with rights setted to
apache:apache
I've added jenkins to group apache, but the instance of jenkins cannot copy files to /var/www/app.
I've also tried with setting privileges of /var/www/app to apache:jenkins but still, Jenkins keep spitting out error: Permission denied or Operation not permitted
PS: Forgot to add OS is centOS ;)
EDIT 1: This is log from jenkins script runnig:
[workspace] $ /bin/sh -xe /tmp/hudson1379987233097some_more_numbers.sh + sh /path_to_sh_script/script.sh sending incremental file list
application/
rsync: failed to set permissions on "/var/www/app/application": Operation not permitted (1)
And this is the script itself :)
#!/bin/bash
rsync -avzh /path/to/jenkins/jobs/app/workspace/default/application /var/www/app ;
rsync -avzh /path/to/jenkins/jobs/app/workspace/default/library /var/www/app ;
rsync -avzh /path/to/jenkins/jobs/app/workspace/default/public /var/www/app ;