[Bug]: incorrect watcher "Error: EACCES: permission denied" for author folders for which it has +rx access to title folders to which it has +w access #2734

Open
opened 2026-04-25 00:10:02 +02:00 by adam · 1 comment
Owner

Originally created by @iconoclasthero on GitHub (Apr 28, 2025).

What happened?

Error: [2025-04-28 10:26:04.225] [Watcher] ERROR Error: EACCES: permission denied, watch '/library/books/audiobooks/Tuccillo, Dylan; Zeizel, Jared; Peisel, Thomas'
However, abs has +rx access to this folder and has no need to write to it, it just needs to be able to read and transit to the book subfolder:

$ lla -d Tuccillo\,\ Dylan\;\ Zeizel\,\ Jared\;\ Peisel\,\ Thomas/
drwxrwxr-x - user user 28 Apr 10:15 'Tuccillo, Dylan; Zeizel, Jared; Peisel, Thomas'

In testing to see if abs can write e.g., metadata.json to the title folder (i.e., the only place that abs needs to write), it clearly can:

$ sudo -u abs touch Tuccillo\,\ Dylan\;\ Zeizel\,\ Jared\;\ Peisel\,\ Thomas/A\ Field\ Guide\ to\ Lucid\ Dreaming\ Mastering\ the\ Art\ of\ Oneironautics/metadata.json.test
$ lla -d Tuccillo\,\ Dylan\;\ Zeizel\,\ Jared\;\ Peisel\,\ Thomas/ Tuccillo\,\ Dylan\;\ Zeizel\,\ Jared\;\ Peisel\,\ Thomas/A\ Field\ Guide\ to\ Lucid\ Dreaming\ Mastering\ the\ Art\ of\ Oneironautics/ Tuccillo\,\ Dylan\;\ Zeizel\,\ Jared\;\ Peisel\,\ Thomas/A\ Field\ Guide\ to\ Lucid\ Dreaming\ Mastering\ the\ Art\ of\ Oneironautics/metadata.json.test 
drwxrwxr-x - user user 28 Apr 10:15 'Tuccillo, Dylan; Zeizel, Jared; Peisel, Thomas'
drwxrwxr-x - user media  28 Apr 11:00 'Tuccillo, Dylan; Zeizel, Jared; Peisel, Thomas'/'A Field Guide to Lucid Dreaming Mastering the Art of Oneironautics'
.rw-r--r-- 0 abs    media  28 Apr 11:00 'Tuccillo, Dylan; Zeizel, Jared; Peisel, Thomas/A Field Guide to Lucid Dreaming Mastering the Art of Oneironautics'/metadata.json.test

So the EACCES permission denied error is incorrect in that

  1. ABS has full read and transit access to all the folders in the path.
  2. It doesn't need to write to the folder to which it doesn't have write access, i.e., the author folder
  3. As ABS already has full read access, there's no reason that ABS couldn't just add the title and be forced to defer writing the metadata.json and cover.jpg files until such point as it has write access to the book folder if that was at issue (which it is not in this case)

Further, pursuant to #4230 this could be added as an "Issue" in the issues section of the UI to be subsequently addressed... which, on my system, happens automatically with a systemd service designed specifically to address the permissions on directories, cover and .json files created by abs...

What did you expect to happen?

I expect that ABS not error out when it can read & transit the folders it needs to to get to the folders it needs to write to and so long as it has read permissions, then it should not fail to add the folder completely.

Steps to reproduce the issue

see above.

Audiobookshelf version

v2.20.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs

see above

Additional Notes

No response

Originally created by @iconoclasthero on GitHub (Apr 28, 2025). ### What happened? Error: `[2025-04-28 10:26:04.225] [Watcher] ERROR Error: EACCES: permission denied, watch '/library/books/audiobooks/Tuccillo, Dylan; Zeizel, Jared; Peisel, Thomas'` However, abs has +rx access to this folder and has no need to write to it, it just needs to be able to read and transit to the book subfolder: ``` $ lla -d Tuccillo\,\ Dylan\;\ Zeizel\,\ Jared\;\ Peisel\,\ Thomas/ drwxrwxr-x - user user 28 Apr 10:15 'Tuccillo, Dylan; Zeizel, Jared; Peisel, Thomas' ``` In testing to see if abs can write e.g., metadata.json to the title folder (i.e., the only place that abs needs to write), it clearly can: ``` $ sudo -u abs touch Tuccillo\,\ Dylan\;\ Zeizel\,\ Jared\;\ Peisel\,\ Thomas/A\ Field\ Guide\ to\ Lucid\ Dreaming\ Mastering\ the\ Art\ of\ Oneironautics/metadata.json.test $ lla -d Tuccillo\,\ Dylan\;\ Zeizel\,\ Jared\;\ Peisel\,\ Thomas/ Tuccillo\,\ Dylan\;\ Zeizel\,\ Jared\;\ Peisel\,\ Thomas/A\ Field\ Guide\ to\ Lucid\ Dreaming\ Mastering\ the\ Art\ of\ Oneironautics/ Tuccillo\,\ Dylan\;\ Zeizel\,\ Jared\;\ Peisel\,\ Thomas/A\ Field\ Guide\ to\ Lucid\ Dreaming\ Mastering\ the\ Art\ of\ Oneironautics/metadata.json.test drwxrwxr-x - user user 28 Apr 10:15 'Tuccillo, Dylan; Zeizel, Jared; Peisel, Thomas' drwxrwxr-x - user media 28 Apr 11:00 'Tuccillo, Dylan; Zeizel, Jared; Peisel, Thomas'/'A Field Guide to Lucid Dreaming Mastering the Art of Oneironautics' .rw-r--r-- 0 abs media 28 Apr 11:00 'Tuccillo, Dylan; Zeizel, Jared; Peisel, Thomas/A Field Guide to Lucid Dreaming Mastering the Art of Oneironautics'/metadata.json.test ``` So the EACCES permission denied error is incorrect in that 1. ABS has full read and transit access to all the folders in the path. 2. It doesn't need to write to the folder to which it doesn't have write access, i.e., the author folder 3. As ABS already has full read access, there's no reason that ABS couldn't just add the title and be forced to defer writing the metadata.json and cover.jpg files until such point as it has write access to the book folder _if that was at issue_ (which it is not in this case) Further, pursuant to #4230 this could be added as an "Issue" in the issues section of the UI to be subsequently addressed... which, on my system, happens automatically with a [systemd service](https://github.com/iconoclasthero/abc/blob/master/absown/absown.service) designed specifically to address the permissions on directories, cover and .json files created by abs... ### What did you expect to happen? I expect that ABS not error out when it can read & transit the folders it needs to to get to the folders it needs to write to and so long as it has read permissions, then it should not fail to add the folder completely. ### Steps to reproduce the issue see above. ### Audiobookshelf version v2.20.0 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs ```shell see above ``` ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:10:02 +02:00
Author
Owner

@Nossarian commented on GitHub (Nov 20, 2025):

I believe I'm also running into this issue. Similar error, though on initial install of abs I had no issues quickmatching covers

[CoverManager] Download image file failed for "https://m.media-amazon.com/images/I/81nh6zlLZSL.jpg" [Error: EACCES: permission denied, open '/media/jellyfin-libs/Books/Audiobooks/Denny Flowers/Above and Beyond/cover'] { errno: -13, code: 'EACCES', syscall: 'open', path: '/media/jellyfin-libs/Books/Audiobooks/Denny Flowers/Above and Beyond/cover' }

EDIT: I immediately resolved with with some more research into setfacl permissions

sudo setfacl -R -m u:audiobookshelf:rwx /path/to/root

@Nossarian commented on GitHub (Nov 20, 2025): I believe I'm also running into this issue. Similar error, though on initial install of abs I had no issues quickmatching covers `[CoverManager] Download image file failed for "https://m.media-amazon.com/images/I/81nh6zlLZSL.jpg" [Error: EACCES: permission denied, open '/media/jellyfin-libs/Books/Audiobooks/Denny Flowers/Above and Beyond/cover'] { errno: -13, code: 'EACCES', syscall: 'open', path: '/media/jellyfin-libs/Books/Audiobooks/Denny Flowers/Above and Beyond/cover' }` EDIT: I immediately resolved with with some more research into setfacl permissions sudo setfacl -R -m u:audiobookshelf:rwx /path/to/root
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2734