本文介绍了Sails Js权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

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

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

有人遇到了这个问题吗?

Anyone got that problem ?

非常感谢

推荐答案

好像您更新了Node.尝试删除.tmp文件夹还要编辑task/config/clean.js:

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

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

这篇关于Sails Js权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 09:04