While @cwelske gives a “hacky” workaround in its answer, the link it provides in the bug report provides the best fix for Gulp 3: use vinyl-fs .
npm install vinyl-fs --save-dev
Change your gulpfile to use VFS:
Add to your block: var vfs = require('vinyl-fs');
Change the output channel: .pipe(vfs.dest('./output'));
The reason I ran into this error was because the files belonged to a more general group and user, so several team members could work together on the project. Obviously, Ubuntu does not allow you to chmod create other files. I suspect the OP is in a similar situation (the web server may own the files).
If you do not require such a setting, another option is to change the files belonging to your user, for example:
sudo chown -R me:me .
Setting permissions on 777 files will not help you, because if you do not own the file, you cannot chmod without sudo. (Therefore, it works when you start Gulp as sudo.)
source share