Jenkinns Backup Plugin Fails on Permission Issue

Keywords: Jenkins - AWS - Technical issue - Permissions
Description:
[ERROR] org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: /tmp/backup_20191211_1353.zip (Permission denied) (and the archive is probably corrupt but I could not delete it)
org.jvnet.hudson.plugins.backup.BackupException: java.io.IOException: org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: /tmp/backup_20191211_1353.zip (Permission denied) (and the archive is probably corrupt but I could not delete it)
at org.jvnet.hudson.plugins.backup.utils.BackupEngine.doBackup(BackupEngine.java:115)
at org.jvnet.hudson.plugins.backup.utils.BackupTask.run(BackupTask.java:130)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: /tmp/backup_20191211_1353.zip (Permission denied) (and the archive is probably corrupt but I could not delete it)
at org.jvnet.hudson.plugins.backup.utils.BackupEngine.handleEnd(BackupEngine.java:104)
at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:336)
at org.jvnet.hudson.plugins.backup.utils.BackupEngine.doBackup(BackupEngine.java:113)

The backup plugin is failing in all directories and with each archive method. I have tried backup directories in /opt/bitnami but I get the same errors in /tmp so I am at a loss at how to continue. There is enough disk space for this procedure and the bitnami user is standard.

the support tool upload does not but I have the zip file.

Hi @somerando,

Could you please upload that file to any cloud platform and share the link with us? I just sent a private message to share that file securely.

Regarding the process to back the application up, could you please let us know the steps you were following?

Thanks

I run the Backup plugin with most options enabled for archiving artifacts and old jobs.

Hi @somerando,
I requested access to the files you send us in the private thread. I need them to download the zip.
Thanks.

I sent it. Thank you.

Hi @somerando,
Could you please check the permissions of your /tmp directory?

ls -l /

If the group has write permissions over that directory you can try to add the user that is executing the plugin to that group, so will be able to write into the /tmp directory.
To check the user that jenkins is using you can execute ps | grep jenkins.
Once you know the user that is executing jenkins and the group of /tmp, if the group has write permissions, you can execute:

sudo usermod -a -G <group> <name>

I tried adding the bitnami and daemon user to these groups and the root group and it still fails. I also have been trying the /home/bitnami folder with the same result.

I fixed this by making a directory in /tmp 777. Thanks everyone.

Hi @somerando,
I am glad you solved it,
You are welcome!!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.