[Bug]: Unable to update on Ubuntu if Audiobook library is read only. #296

Closed
opened 2026-04-24 23:03:59 +02:00 by adam · 4 comments
Owner

Originally created by @cenjui on GitHub (Apr 25, 2022).

Describe the issue

I used apt-get to perform an update from 2.0.2 to 2.0.3 and if failed with the error:

multiple lines showing:

chown: changing ownership of '/usr/share/audiobookshelf/audiobooks/author/book/file.mp3': Read-only file system
then finally
chown: changing ownership of '/usr/share/audiobookshelf/audiobooks': Read-only file system

dpkg: error processing package audiobookshelf (--configure):
installed audiobookshelf package post-installation script subprocess returned error exit status 1

I have my audiobooks stored on a NAS and they are mounted in a read only NFS share that is linked to /usr/share/audiobookshelf/audiobooks

Everything else under /usr/share/audiobookshelf is stored with read/write access locally.

I was able to resolve the issue by un-mounting the audiobooks, doing the update then mounting the audio books again, ie:
$ sudo systemctl stop audiobookshelf

$ sudo umount /usr/share/audiobookshelf/audiobooks

$ sudo apt-get upgrade audiobookshelf

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
libfwupdplugin1 libllvm11
Use 'sudo apt autoremove' to remove them.
1 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
After this operation, B of additional disk space will be used.
Do you want to continue? [Y/n] y

Setting up audiobookshelf (2.0.3) ...

Created symlink /etc/systemd/system/multi-user.target.wants/audiobookshelf.service → /lib/systemd/system/audiobookshelf.service.

$ sudo mount /usr/share/audiobookshelf/audiobooks

$ sudo systemctl start audiobookshelf

Does audiobookshelf need to make changes to the actual audio book files?

Steps to reproduce the issue

  1. Install v2.0.2
  2. Make audio book directory read only
  3. Attempt to use apt-get to update to v2.0.3

Audiobookshelf version

v2.0.2

How are you running audiobookshelf?

Debian/PPA

Originally created by @cenjui on GitHub (Apr 25, 2022). ### Describe the issue I used apt-get to perform an update from 2.0.2 to 2.0.3 and if failed with the error: <code>multiple lines showing: chown: changing ownership of '/usr/share/audiobookshelf/audiobooks/author/book/file.mp3': Read-only file system</code> then finally <code>chown: changing ownership of '/usr/share/audiobookshelf/audiobooks': Read-only file system dpkg: error processing package audiobookshelf (--configure): installed audiobookshelf package post-installation script subprocess returned error exit status 1 </code> I have my audiobooks stored on a NAS and they are mounted in a read only NFS share that is linked to /usr/share/audiobookshelf/audiobooks Everything else under /usr/share/audiobookshelf is stored with read/write access locally. I was able to resolve the issue by un-mounting the audiobooks, doing the update then mounting the audio books again, ie: <code>$ sudo systemctl stop audiobookshelf $ sudo umount /usr/share/audiobookshelf/audiobooks $ sudo apt-get upgrade audiobookshelf Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: libfwupdplugin1 libllvm11 Use 'sudo apt autoremove' to remove them. 1 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade. After this operation, B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up audiobookshelf (2.0.3) ... Created symlink /etc/systemd/system/multi-user.target.wants/audiobookshelf.service → /lib/systemd/system/audiobookshelf.service. $ sudo mount /usr/share/audiobookshelf/audiobooks $ sudo systemctl start audiobookshelf </code> Does audiobookshelf need to make changes to the actual audio book files? ### Steps to reproduce the issue 1. Install v2.0.2 2. Make audio book directory read only 3. Attempt to use apt-get to update to v2.0.3 ### Audiobookshelf version v2.0.2 ### How are you running audiobookshelf? Debian/PPA
adam added the bug label 2026-04-24 23:03:59 +02:00
adam closed this issue 2026-04-24 23:04:01 +02:00
Author
Owner

@advplyr commented on GitHub (Apr 25, 2022):

Read-only should be fine. Where are those chown logs coming from? Those logs aren't from abs right?

@advplyr commented on GitHub (Apr 25, 2022): Read-only should be fine. Where are those chown logs coming from? Those logs aren't from abs right?
Author
Owner

@cenjui commented on GitHub (Apr 25, 2022):

No, they are from the apt-get command line. I need to check but I think when I do an apt-get upgrade upgrade of abs it downloads the new version and then runs through the package installation commands. In the postinst file at the end it says:

mkdir -p '/var/log/audiobookshelf'

chown -R 'audiobookshelf:audiobookshelf' '/var/log/audiobookshelf'

chown -R 'audiobookshelf:audiobookshelf' '/usr/share/audiobookshelf'

chown -R 'audiobookshelf:audiobookshelf' "$FFMPEG_INSTALL_DIR"

I think it attempts to do this on upgrade as well, normally that wouldn't be an issue if you have a read/write file system but with a read only file system the command fails with exit code 1, which then causes the upgrade to fail.

A fix would be to check if the directory exists in which case either don't make any changes or check if its read only? I would try and fix it myself but my skills are not quite up to it, sorry!

@cenjui commented on GitHub (Apr 25, 2022): No, they are from the apt-get command line. I need to check but I think when I do an apt-get upgrade upgrade of abs it downloads the new version and then runs through the package installation commands. In the postinst file at the end it says: <code> mkdir -p '/var/log/audiobookshelf' chown -R 'audiobookshelf:audiobookshelf' '/var/log/audiobookshelf' chown -R 'audiobookshelf:audiobookshelf' '/usr/share/audiobookshelf' chown -R 'audiobookshelf:audiobookshelf' "$FFMPEG_INSTALL_DIR" </code> I think it attempts to do this on upgrade as well, normally that wouldn't be an issue if you have a read/write file system but with a read only file system the command fails with exit code 1, which then causes the upgrade to fail. A fix would be to check if the directory exists in which case either don't make any changes or check if its read only? I would try and fix it myself but my skills are not quite up to it, sorry!
Author
Owner

@advplyr commented on GitHub (May 20, 2022):

I rewrote the debian installer to first check if the folders exist before setting permissions.
Hopefully that should resolve this for read-only folders but let me know if not and we can keep working on it.
This is in v2.0.15

@advplyr commented on GitHub (May 20, 2022): I rewrote the debian installer to first check if the folders exist before setting permissions. Hopefully that should resolve this for read-only folders but let me know if not and we can keep working on it. This is in [v2.0.15](https://github.com/advplyr/audiobookshelf/releases/tag/v2.0.15)
Author
Owner

@cenjui commented on GitHub (May 24, 2022):

This worked perfectly for me updating to v2.0.15 - thank you!

@cenjui commented on GitHub (May 24, 2022): This worked perfectly for me updating to v2.0.15 - thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#296