4

I am trying to overwrite a file on a mac fileserver using:

gulp.dest('DESTINATIONPATH')

The Error:

Error: EACCES, chmod 'FILEPATH'
   at Error (native)

The filepath is returning the path to the file that I want to overwrite.

I already tried gulp-chmod, but since that is only applying to the source file that I actually want to copy, it has no effect on the file that I want to overwrite.

As a creator of the file that I want to overwrite, it works from my Mac. But when my colleagues try to overwrite, they get the error.

Marten Zander
  • 2,385
  • 3
  • 17
  • 32

1 Answers1

0

How about piping the destination?

var gulp = require('gulp'); var chmod = require('gulp-chmod');

gulp.task('default', function () {
    return gulp.src('FILEPATH').pipe(chmod(755)).pipe(gulp.dest('DESTINATIONPATH'));
});
vorillaz
  • 6,098
  • 2
  • 30
  • 46