-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
database.json的权限问题 #8
Comments
style.css这个文件也比较奇怪,同目录下的duoshuo.css相同权限,载入没有问题,style.css的读取就会出问题,要设置777 error: Error: EACCES, open '/var/www/site/public/stylesheets/style.css' errno=3, code=EACCES, path=/var/www/site/public/stylesheets/style.css |
我看看 fs.writeFile 的默认权限是啥 |
嗯,刚试了下,因为pm2默认是从app.js中读取程序的配置信息,导致env=production没读到,在upstart脚本里传了参数以后没问题了。 |
话说我最近也在尝试用pm2代替forever,正在写一个pm2panel,欢迎关注~ 国庆期间应该可以完成~ |
这个文件的读写权限有问题,要设置777或者用root执行才可以,否则报错
fs.js:427
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EACCES, permission denied '/var/www/site/database.json'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.writeFileSync (fs.js:966:15)
at Object.exports.set (/var/www/site/pkg.js:9:12)
at new Server (/var/www/site/app.js:22:9)
at Object. (/var/www/site/server.js:3:5)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10
The text was updated successfully, but these errors were encountered: