I'm having issue similar to this:How to copy files as Jenkins post build action if i don't have privileges to destination directoryI'm willing to move/copy/rsync files from jenkins workspace to/var/www/app  with rights setted toapache:apacheI'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 permittedPS: 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 ;
Privileges for jenkins at apache's folder
permissions;apache httpd;group;privileges;jenkins
After a long and fruitful discussion in the comments, and following this link the user managed to solve the problem adding--no-perms --omit-dir-timesto the rsync options.Preliminary attempts to solve the issue:I guess if security does not concern you for a short period of time, you can trychmod a+rwx /var/www/app and then try to write to this directory. Note that if there are subdirectories you must do it recursively with:chmod --recursive a+rwx /var/www/app If it's successful, then you can start removing permissions gradually and this will help you pinpoint the problem. Verify that the user jenkins is already a group member of apache with groups apache