jenkins有些操作被禁止,报“Operation not permitted“错误

一、问题描述:

我的jenkins在文档归档时,提示我某些步骤禁止操作("Operation not permitted"),具体报错如下:

[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at PROJECT level /var/lib/jenkins/workspace/算法精度测试 to /var/lib/jenkins/jobs/算法精度测试/htmlreports/HTML_20Report
FATAL: HTML Publisher failure
jenkins.util.io.CompositeIOException: Unable to delete '/var/lib/jenkins/jobs/算法精度测试/htmlreports/HTML_20Report'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
	at jenkins.util.io.PathRemover.forceRemoveRecursive(PathRemover.java:99)
	at hudson.Util.deleteRecursive(Util.java:321)
	at hudson.FilePath$DeleteRecursive.invoke(FilePath.java:1408)
	at hudson.FilePath$DeleteRecursive.invoke(FilePath.java:1404)
	at hudson.FilePath.act(FilePath.java:1173)
	at hudson.FilePath.act(FilePath.java:1156)
	at hudson.FilePath.deleteRecursive(FilePath.java:1402)
	at htmlpublisher.HtmlPublisher.publishReports(HtmlPublisher.java:239)
	at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:70)
	at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:45)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
	at hudson.security.ACL.impersonate2(ACL.java:449)
	at hudson.security.ACL.impersonate(ACL.java:461)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
	Suppressed: java.nio.file.FileSystemException: /var/lib/jenkins/jobs/算法精度测试/htmlreports/HTML_20Report: Operation not permitted
		at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
		at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
		at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
		at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:254)
		at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:276)
		at java.base/java.nio.file.Files.setPosixFilePermissions(Files.java:2080)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:286)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:259)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:239)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:205)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:216)
		at jenkins.util.io.PathRemover.forceRemoveRecursive(PathRemover.java:96)
		... 18 more
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: FAILURE

二、问题解决:

怎么解决?

上一篇:Java常用类之与时间相关的类Calendar(java.util.Calendar)


下一篇:Spark内核原理