[GH-ISSUE #86] Clarify "fs.js:1051" error caused by incorrect log permissions #65

Closed
opened 2026-02-26 05:31:13 +03:00 by kerem · 3 comments
Owner

Originally created by @holachek on GitHub (Jul 24, 2013).
Original GitHub issue: https://github.com/NarrativeScience-old/log.io/issues/86

I get this error when I specify a log file to watch that can't be read due to restricted access permissions (e.g., a log file mode of 400):

fs.js:1051
    throw errnoException(process._errno, 'watch');
          ^
Error: watch EACCES
    at errnoException (fs.js:1019:11)
    at FSWatcher.start (fs.js:1051:11)
    at Object.fs.watch (fs.js:1076:11)
    at LogStream._watchFile (/usr/lib/node_modules/log.io/lib/harvester.js:83:27)
    at LogStream.watch (/usr/lib/node_modules/log.io/lib/harvester.js:66:14)
   ....

It took me a while to figure out that file permissions were the problem. I think it would be helpful to clarify that the error is due to file permissions.... maybe echo out an error message like "Can't read log file due to incorrect permissions." so future users don't have to troubleshoot for a solution.

Originally created by @holachek on GitHub (Jul 24, 2013). Original GitHub issue: https://github.com/NarrativeScience-old/log.io/issues/86 I get this error when I specify a log file to watch that can't be read due to restricted access permissions (e.g., a log file mode of 400): ``` fs.js:1051 throw errnoException(process._errno, 'watch'); ^ Error: watch EACCES at errnoException (fs.js:1019:11) at FSWatcher.start (fs.js:1051:11) at Object.fs.watch (fs.js:1076:11) at LogStream._watchFile (/usr/lib/node_modules/log.io/lib/harvester.js:83:27) at LogStream.watch (/usr/lib/node_modules/log.io/lib/harvester.js:66:14) .... ``` It took me a while to figure out that file permissions were the problem. I think it would be helpful to clarify that the error is due to file permissions.... maybe echo out an error message like "Can't read log file due to incorrect permissions." so future users don't have to troubleshoot for a solution.
kerem closed this issue 2026-02-26 05:31:13 +03:00
Author
Owner

@ghost commented on GitHub (Jan 28, 2014):

And how to fix the permissions?

<!-- gh-comment-id:33512102 --> @ghost commented on GitHub (Jan 28, 2014): And how to fix the permissions?
Author
Owner

@msmathers commented on GitHub (Aug 1, 2014):

Unfortunately there are hundreds of potential errors that could be produced throughout the log.io stack, and properly messaging them all would take a lot of work and string parsing that would likely change as dependencies and node.js evolves. Although cryptic, EACCES is a relatively well-known error code in the node.js world.

<!-- gh-comment-id:50854448 --> @msmathers commented on GitHub (Aug 1, 2014): Unfortunately there are hundreds of potential errors that could be produced throughout the log.io stack, and properly messaging them all would take a lot of work and string parsing that would likely change as dependencies and node.js evolves. Although cryptic, EACCES is a relatively well-known error code in the node.js world.
Author
Owner

@seanmavley commented on GitHub (Jan 1, 2017):

@holachek And so what was the solution? 2017, and still having same issue.

<!-- gh-comment-id:269898249 --> @seanmavley commented on GitHub (Jan 1, 2017): @holachek And so what was the solution? 2017, and still having same issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/log.io-NarrativeScience-old#65
No description provided.