Cronicle icon indicating copy to clipboard operation
Cronicle copied to clipboard

Permission deny when start, MacOS

Open lu9999 opened this issue 3 years ago • 4 comments

Summary

/opt/cronicle/bin/control.sh start: Starting up Cronicle Daemon... Error: EACCES: permission denied, open 'logs/Cronicle.log' at Object.openSync (node:fs:599:3) at Object.writeFileSync (node:fs:2221:35) at Object.appendFileSync (node:fs:2283:6) at Logger.print (/opt/cronicle/node_modules/pixl-server/node_modules/pixl-logger/logger.js:242:26) at Logger.debug (/opt/cronicle/node_modules/pixl-server/node_modules/pixl-logger/logger.js:287:9) at __construct.logDebug (/opt/cronicle/node_modules/pixl-server/server.js:612:16) at __construct.__init (/opt/cronicle/node_modules/pixl-server/server.js:159:10) at __construct.startup (/opt/cronicle/node_modules/pixl-server/server.js:393:8) at Object. (/opt/cronicle/lib/main.js:35:8) at Module._compile (node:internal/modules/cjs/loader:1112:14) { errno: -13, syscall: 'open', code: 'EACCES', path: 'logs/Cronicle.log' } /opt/cronicle/bin/control.sh start: Cronicle Daemon could not be started

Steps to reproduce the problem

/opt/cronicle/bin/control.sh start in MacOS Sudo will work but will run under different user cause issue when run shell script inside

Operating system and version?

MacOS 12.4

Node.js version?

node v18.4.0

Cronicle software version?

The latest one, was upgraded today

lu9999 avatar Jun 21 '22 18:06 lu9999

Looks like you have an old log file that was created under a different user (probably root). Recommend you just move it out of the way and try to start it again.

There will likely be a bunch of differently named log files in the logs folder. Please make sure they are either moved out of the way, or chowned to the user you are trying to run Cronicle as.

jhuckaby avatar Jun 21 '22 19:06 jhuckaby

Screen Shot 2022-06-21 at 12 56 17 PM

All log files are set to full access, same issue

lu9999 avatar Jun 21 '22 19:06 lu9999

What about the directory itself? If you want to run Cronicle as user luyaowu then I believe EVERYTHING needs to be chowned to that user, including all the directories.

jhuckaby avatar Jun 21 '22 19:06 jhuckaby

Screen Shot 2022-06-21 at 1 27 48 PM I did add full access for the folder as well

lu9999 avatar Jun 21 '22 20:06 lu9999