User 101
User 101

Reputation: 1431

create file at a restricted directory using gulp-dest

I have written an gulp script as :

    gulp.task('scss', function(done) {
  gulp.src('home/a.scss')
    .pipe(sass({
      errLogToConsole: true
    }))
    .pipe(rename('chatbot.css'))
    .pipe(gulp.dest('/var/www/html/css'))  // restrcited path
    .pipe(minifyCss({
      keepSpecialComments: 0
    }))
    .on('end', done);
});

here /var/www/html/css is a directory created via sudo hence no files can be created inside it normally.

so how can i create this file using gulp.

Upvotes: 0

Views: 25

Answers (1)

Daniel Diekmeier
Daniel Diekmeier

Reputation: 3434

You could use chown to change the ownership of the folder, so that it belongs to your user account again: https://askubuntu.com/questions/6723/change-folder-permissions-and-ownership

Or you could try sudo gulp scss, I guess.

Upvotes: 1

Related Questions