‘/var/www/html directory normally requires root privileges to update. Doing so as user Jenkins is not going to work unless you have altered the directory permissions (highly non-advisable) to match.
From: [email protected] [mailto:[email protected]] On Behalf Of David Hohl Sent: October-26-16 16:05 To: Jenkins Users Subject: Re: permission denied error when copying files in jenkins I have actually the same problem, if I run: su -l jenkins -s /bin/bash -c 'cp /var/lib/jenkins/workspace/xxx/index.php /var/www/html/tmp/' the result is: cannot create regular file ‘/var/www/html/tmp/index.php’: Permission denied What can I do? On Friday, April 22, 2016 at 2:29:11 PM UTC+2, Alex Domoradov wrote: You can check in the server console # su -l jenkins -s /bin/bash -c 'cp /location/path1/file1.txt /location2/path2/file1.txt' On Thursday, April 21, 2016 at 11:53:59 PM UTC+3, Pradeep Patra wrote: Hi all, . I have created a Jenkins server (master) and tried copying from one location/path of jenkins server to another location a Perl script within the same server. I have changed all the file/ folders for Jenkins user/group(chown,chgrp)and restarted the Jenkins server. While copying files I an getting error " regular file cp failed: Permission denied error after trigerring the Jenkins job which uses script to copy files. Can anyone help in this please? Regards Pradeep -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/2d7c85fc-86d5-44c8-bae7-22ea4ba9231e%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/2d7c85fc-86d5-44c8-bae7-22ea4ba9231e%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d4300bf09b5149f780b55c7def19e6aa%40mbx02cmb01p.esentire.local. For more options, visit https://groups.google.com/d/optout.
