Sails Js 权限

Sails Js permissions

我在 debian 服务器上安装了一个 sailsjs 应用程序。我唯一的用户是 root,我在 root 中安装了所有东西(npm install、npm install sails -g、npm install pm2 -g)。当我尝试使用我的 root 用户 (sails lift --prod) 部署它时,出现权限错误:

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. 
------------------------------------------------------------------------

我检查了每个文件夹的权限,它们都是 root 拥有的。

有人遇到过这个问题吗?

非常感谢

您可以添加 options: { force: true } Grunt 任务的选项
另外,你能提供完整的 Gruntfile 吗?

看起来,您更新了 Node.Try 以删除 .tmp 文件夹 同时编辑 tasks/config/clean.js:

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