我在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所有。
任何人都有这个问题吗?
非常感谢
答案 0 :(得分:4)
看起来,您更新了Node.Try删除.tmp文件夹 还要编辑tasks / config / clean.js:
grunt.config.set('clean', {
options: { force: true },
dev: ['.tmp/public/**'],
build: ['www']
});
答案 1 :(得分:1)
你可以添加
options: { force: true }
Grunt任务的选项
另外,你能提供完整的Gruntfile吗?