Windows permissions error
See original GitHub issueSometimes when I’m running Gulp, there will spontaneously be an issue with a directory I’ve cleaned and Gulp suddenly can’t access it. If I look into it, I find that the folder has lost its owner and Windows says “Unable to display current owner” in the folder’s properties -> Security -> Advanced. From here it’s nearly impossible to get rid of. I have to execute a takeown using the administrator account through CMD ran as administrator, and even that didn’t really work the last time, so I restarted and the folder was gone.
I realize that’s an incredibly unscientific rundown and doesn’t help to narrow down the issue, but you can find my gulpfile here, as perhaps something sticks out as unusual. The build
folder is the one that’s getting borked. Most recently, the issue happened during the imagemin
task run as part of the build
task, but this isn’t consistent.
This rarely happens (and I’m sure I couldn’t recreate it if I tried), so I know I’m kind of shooting in the dark. Maybe something in my tasks is unusual?
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (2 by maintainers)
Top GitHub Comments
Yeah, guess I could follow up here: may be a thing with Atom as well. If it’s open in there, it’s claiming ownership it seems, preventing me from doing anything with it.
I’m not sure there’s anything we can do about other processes claiming ownership of files; however, in going over some code for gulp 4, I found that vinyl-fs wasn’t using graceful-fs when creating directories and we had some chmod/utimes problems that we’ve since fixed. If you are using gulp 3, I suggest upgrading to gulp 4 and see if that helps.