Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSTS Extract zip fails with 'EPERM: operation not permitted, stat 'D:\MyFilePathHere'

I frequently but not consistently run into EPERM: operation not permitted, stat 'D:\MyFilePathHere when using the 'Extract Files' Task with the Clean Destination Folder before extracting option in my Release Definition. It happen on multiple machines but has resolved itself with redeploys. Suggestions for preventing this in the future?

Edit: I have the local agents configured to run as a Network Service and I have given Network Service full control of the folder which Extract Files is working in. I have the release definition running on two different machines. The release will succeed on one and fail on the other.

Found: 1 files to extract: C:\agent\_work\r2\a\App-CI\App\App.zip Cleaning destination folder before extraction: D:\FilePathHere Error: EPERM: operation not permitted, stat 'D:\FilePathHere' ##[error]EPERM: operation not permitted, stat 'D:\FilePathHere ##[section]Finishing: Install New UI Files

like image 346
Calidus Avatar asked Jul 25 '18 20:07

Calidus


1 Answers

Turns out this is a open issue on GitHub: https://github.com/Microsoft/vsts-tasks/issues/5472

It seems to be a conflict between the agent and anti-virus/security software. The way around is to use the Delete File/Folder task right before the Extract Tasks without the Clean Target Folder option.

like image 109
Calidus Avatar answered Nov 03 '22 00:11

Calidus