Sails Js permissions

倾然丶 夕夏残阳落幕 提交于 2020-01-11 13:22:15

问题


I got a sailsjs app on a debian server. My only user is root, I installed everything in root (npm install, npm install sails -g, npm install pm2 -g). When I try to deploy it with my root user (sails lift --prod), I got permissions errors :

Grunt :: Running "clean:dev" (clean) task
Grunt :: Cleaning .tmp/public...
Grunt :: Warning: Cannot delete files outside the current working directory. 
** Grunt :: An error occurred. **
error: 
------------------------------------------------------------------------
Aborted due to warnings.
Running "clean:dev" (clean) task
Cleaning .tmp/public...Warning: Cannot delete files outside the current working directory. 
------------------------------------------------------------------------

I checked permissions for every folder, they are all owned by root.

Anyone got that problem ?

Thank you very much


回答1:


Looks like, you updated your Node.Try to delete .tmp folder Also edit tasks/config/clean.js:

  grunt.config.set('clean', {
    options: { force: true },
    dev: ['.tmp/public/**'],
    build: ['www']
  });



回答2:


You can add options: { force: true } option to Grunt task
Also, can you provide full Gruntfile?



来源:https://stackoverflow.com/questions/35624877/sails-js-permissions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!