1
我有具有clean
任務來刪除一些緩存文件咕嚕構建腳本。目前此任務,因爲它應該是刪除文件是隻讀的失敗。你如何刪除只讀與咕嚕乾淨的文件?
你如何grunt clean
刪除只讀文件?
對於那些誰是好奇,從我的命令的輸出如下:
Running "clean:templates" (clean) task
Verifying property clean.templates exists in config...OK
Files: app/cache/dev/twig, app/cache/prod/twig -> templates
Options: force
Cleaning "app/cache/dev/twig"...Deleting app/cache/dev/twig...ERROR
ERROR
>> Error: Unable to delete "app/cache/dev/twig" file (EPERM, operation not permitted 'app/cache/dev/twig').
Warning: Clean operation failed. Use --force to continue.
在app/cache/dev/twig
文件夾中的文件是隻讀的並且可以使用命令rm -rf app/cache/dev/twig
被刪除。
我確實嘗試了這個作爲解決方法,但是我得到了相同的訪問被拒絕的錯誤。我認爲,這是因爲我通過ACL條目歸因權限的文件。 – Josiah