错误:EACCES:权限被拒绝,打开.audit.json

时间:2018-09-14 00:49:33

标签: node.js linux winston

我试图通过node.js在我的角度应用程序中实现Winston记录器以及winston-daily-rotate文件。

代码在本地Windows环境中工作正常,但是当我转向Linux中的更高环境时,通过执行“ node server.js”启动我的应用程序时出现以下权限错误

请帮助解决问题是由于许可还是其他原因

text-align: center;

Server.js的一部分

'[FileStreamRotator] Failed to store log audit at:' '//.audit.json' 'Error:' { Error: EACCES: permission denied, open '//.audit.json'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.writeFileSync (fs.js:1299:33)
at Object.FileStreamRotator.writeAuditLog (/apps/app/node_modules/file-stream-rotator/FileStreamRotator.js:244:12)
at Object.FileStreamRotator.addLogToAudit (/apps/app/node_modules/file-stream-rotator/FileStreamRotator.js:318:27)
at EventEmitter.<anonymous> (/apps/app/node_modules/file-stream-rotator/FileStreamRotator.js:432:34)
at emitOne (events.js:116:13)
at EventEmitter.emit (events.js:211:7)
at /apps/app/node_modules/file-stream-rotator/FileStreamRotator.js:478:20
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '//.audit.json' }

OS:Red Hat Enterprise Linux Server 7.5(Maipo)

0 个答案:

没有答案