【问题标题】:Sails Js permissionsSails Js 权限
【发布时间】:2016-06-08 02:01:21
【问题描述】:

我在 debian 服务器上安装了一个sailsjs 应用程序。我唯一的用户是 root,我在 root 中安装了所有东西(npm install、npm installsails -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 所有。

有人遇到过这个问题吗?

非常感谢

【问题讨论】:

    标签: node.js sails.js pm2


    【解决方案1】:

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

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

    【讨论】:

    • 很好的答案!选项:{ force: true } 修复了我的问题。尝试了几个小时的其他事情......
    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 2016-01-21
      • 1970-01-01
      • 2016-06-03
      • 2015-10-03
      • 1970-01-01
      • 1970-01-01
      • 2020-10-01
      • 2014-08-23
      • 1970-01-01
      相关资源
      最近更新 更多