TFS - Erro de Permissões Ocasionais ao Limpar

3

Estou executando um TFS 2017 Build Server no local.

Como parte do meu processo, eu apago todos os arquivos existentes em uma pasta de destino (usando o Apagar o Utilitário de Arquivos ).

Isso funciona quase todas as vezes, no entanto, algum tipo de permissão é confundido em um arquivo e esse processo não pode excluí-lo. A exclusão manual do arquivo do Explorer corrige as coisas, mas eu gostaria de poder excluir arquivos automaticamente usando meu processo de criação.

Eu verifiquei e a conta de serviço do TFS tem todos os direitos sobre o arquivo.

Aqui está o erro

##[section]Starting: Clean Files 
==============================================================================
Task         : Delete Files
Description  : Delete files or folders. (The minimatch patterns will only match file paths, not folder paths)
Version      : 1.1.3
Author       : Microsoft Corporation
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=722333)
==============================================================================
##[error]Error: Failed rmRF: EPERM: operation not permitted, unlink 'C:\Web\Nodes\hercules\Content\member-int.buzz\Content\Files1007DF9C61D440A64FE881E76E727DFFD702-THUMB.png'
##[error]Error: Failed rmRF: EPERM: operation not permitted, unlink 'C:\Web\Nodes\hercules\Content\member-int.buzz\Content\Files1007DF9C61D440A64FE881E76E727DFFD702.jpg'
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content\Files/181007DF9C61D440A64FE881E76E727DFFD702-THUMB.png
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content\Files/181007DF9C61D440A64FE881E76E727DFFD702-THUMB.png
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content\Files/181007DF9C61D440A64FE881E76E727DFFD702.jpg
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content\Files/181007DF9C61D440A64FE881E76E727DFFD702-THUMB.png 
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content\Files/181007DF9C61D440A64FE881E76E727DFFD702.jpg
rm: could not remove directory (code ENOTEMPTY): C:\Web\Nodes\hercules\Content\member-int.buzz\Content\Files

##[error]Error: Failed rmRF: rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content\Files/181007DF9C61D440A64FE881E76E727DFFD702-THUMB.png
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content\Files/181007DF9C61D440A64FE881E76E727DFFD702.jpg
rm: could not remove directory (code ENOTEMPTY): C:\Web\Nodes\hercules\Content\member-int.buzz\Content\Files
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content/Files/181007DF9C61D440A64FE881E76E727DFFD702-THUMB.png
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content/Files/181007DF9C61D440A64FE881E76E727DFFD702-THUMB.png
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content/Files/181007DF9C61D440A64FE881E76E727DFFD702.jpg
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content/Files/181007DF9C61D440A64FE881E76E727DFFD702-THUMB.png
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content/Files/181007DF9C61D440A64FE881E76E727DFFD702.jpg
rm: could not remove directory (code ENOTEMPTY): C:\Web\Nodes\hercules\Content\member-int.buzz\Content/Files
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content/Files/181007DF9C61D440A64FE881E76E727DFFD702-THUMB.png
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content/Files/181007DF9C61D440A64FE881E76E727DFFD702.jpg
rm: could not remove directory (code ENOTEMPTY): C:\Web\Nodes\hercules\Content\member-int.buzz\Content/Files
rm: could not remove directory (code ENOTEMPTY): C:\Web\Nodes\hercules\Content\member-int.buzz\Content
##[error]Error: Failed rmRF: rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content/Files/181007DF9C61D440A64FE881E76E727DFFD702-THUMB.png
rm: could not remove file (code EPERM): C:\Web\Nodes\hercules\Content\member-int.buzz\Content/Files/181007DF9C61D440A64FE881E76E727DFFD702.jpg
rm: could not remove directory (code ENOTEMPTY): C:\Web\Nodes\hercules\Content\member-int.buzz\Content/Files
rm: could not remove directory (code ENOTEMPTY): C:\Web\Nodes\hercules\Content\member-int.buzz\Content
##[error]Couldn't delete one or more files
##[section]Finishing: Clean Files

Nem sempre é o mesmo arquivo que fica confuso.

    
por William 08.10.2018 / 12:48

0 respostas