Retention policy warning

What would cause a Retention policy warning when deploying with Octopus?

Processing retention policy
Warning 21:08:07
Error while applying Tentacle package retention
Access to the path ‘camera.js’ is denied.
System.UnauthorizedAccessException: Access to the path ‘camera.js’ is denied.
at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)

Octopus 2.5.5.318
at Octopus.Tentacle.Deployment.Journal.DeploymentJournal.ApplyRetentionPolicy(String retentionToken, ILog log) in y:\work\refs\heads\master\source\Octopus.Tentacle\Deployment\Journal\DeploymentJournal.cs:line 117
at Octopus.Tentacle.Orchestration.TentaclePackageRetention.TentacleRetentionProcessor.Receive(TentaclePerformRetentionProcessingCommand message) in y:\work\refs\heads\master\source\Octopus.Tentacle\Orchestration\TentaclePackageRetention\TentacleRetentionProcessor.cs:line 32
Tentacle version 2.5.5.318
Info 21:08:07
Retention processing complete

Hi Scott,

Thanks for getting in touch! We have had one report of this, and it wasn’t excellent news for the customer.
The retention policy fails when it encounters a file it can’t delete due to permissions, in this case ‘camera.js’.

In the previous case we have had, it turned out to be hacked files being placed on the server that had different permissions that Octopus could not delete.
Now if this file name is familiar to you, you would need to check its permissions, and see how/if they changed or if they were placed on the server outside of an Octopus process.

Let me know what you find.
Vanessa

Vanessa, the error message doesn’t include the file path so it was tedious but I looked at several of the old version of camera.js in C:\Octopus\Applications… Some of the versions of camera.js are read only and some are not. This issue appears to be File attribute related and not ACL related. Can Octopus be enhanced to delete read only files?

scott

Hi Scott,

I’ve added a ticket, we are gonna see what we can do about it.

Vanessa