Write error on the library (docker install)

Hello,

I have installed Xibo 1.8.0 with Docker on a Ubuntu server.

I have an error saying that the library is not writeable (in French) :

Erreur de configuration
La Médiathèque n’est pas accessible à l’écriture

I installed Xibo into /opt/xibo as root.
Folders /opt/xibo/shared/cms/custom & library has been created as www-data.

Is it the folder /opt/xibo/shared/cms/library which has the right issue?
I tried to change rights of this folder without success :frowning:

How can I fix this error?

Thank you in advance!

Did you follow Alex’s guide? Xibo 1.8.0 with Docker on Ubuntu 16.04

It would best to install 1.8.2 (or upgrade to it), as it has a lot of fixes/improvements over 1.8.0 release.

As for the error, indeed it seems like a permissions issue to the library folder.

Those files should be owned by www-data as the container sees it - and that’s very unlikely to be the www-data user on your host machine.

If you down and up the container, or upgrade as Peter suggests, the container will fix the permissions itself automatically.

Thank you for your replies.

I followed Xibo 1.8.0 with Docker on Ubuntu 16.04 several times :frowning:

I installed 1.8.2 and it is the same.

Please find below some informations.

================================================================================
root@xibo-vm:/opt/xibo# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
83fe4d3145d5 xibosignage/xibo-cms:release_1.8.2 “/entrypoint.sh” 2 minutes ago Up 25 seconds 0.0.0.0:80->80/tcp
xibo_cms-web_1
d685fe099ce6 xibosignage/xibo-xmr:release_1.8.2 “/entrypoint.sh” 2 minutes ago Up 26 seconds 0.0.0.0:9505->9505/tcp, 50001/tcp
xibo_cms-xmr_1
a33024da58e3 xibosignage/xibo-xmr:release_1.8.0 “/entrypoint.sh” 24 hours ago Up 26 seconds 9505/tcp, 50001/tcp
clever_ramanujan
509e223a6b33 xibosignage/xibo-cms:release_1.8.0 “/entrypoint.sh” 24 hours ago Up 26 seconds 80/tcp
ecstatic_payne

================================================================================
root@xibo-vm:/opt/xibo# ll
total 108
drwxr-xr-x 3 root root 4096 Jun 28 16:07 ./
drwxr-xr-x 5 root root 4096 Jun 27 15:35 …/
-rw-rw-r-- 1 admin-xibo admin-xibo 1137 Jun 26 12:49 cms_custom-ports.yml.template
-rw-rw-r-- 1 admin-xibo admin-xibo 807 Jun 26 12:49 cms_remote-mysql.yml
-rwxrwxrwx 1 root root 1835 Jun 27 16:12 config.env*
-rw-rw-r-- 1 admin-xibo admin-xibo 2331 May 30 08:51 config.env.template
-rw-rw-r-- 1 admin-xibo admin-xibo 1861 Feb 22 16:09 config.env.template-remote-mysql
-rw-rw-r-- 1 admin-xibo admin-xibo 1133 Jun 26 14:04 docker-compose.yml.template
-rw-rw-r-- 1 admin-xibo admin-xibo 34520 Jun 22 2016 LICENSE
-rw-rw-r-- 1 admin-xibo admin-xibo 2088 Feb 22 08:43 README.md
drwxrwxrwx 4 root root 4096 Jun 27 16:14 shared/
-rw-r–r-- 1 root root 14824 May 25 17:01 xibo-docker-1.8.0.tar.gz
-rw-r–r-- 1 root root 15313 Jun 26 14:27 xibo-docker-1.8.2.tar.gz

You have two web and two xmr containers running, one set of which weren’t
started by docker-compose

I’d suggest removing all of them, and the bringing the containers up from
docker-compose again

Hi,

I removed all containers. Then I reinstall 1.8.2.
I still have the same error :frowning:

http://myip/login
Erreur de configuration
La Médiathèque n’est pas accessible à l’écriture

I always make the installation as root.
Could it be the cause of the mistake?

Thank you

=============================================================================
xibo-vm:/opt/xibo/shared# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
1f0fc1b3c21d xibosignage/xibo-cms:release_1.8.2 “/entrypoint.sh” 5 minutes ago Up 5 minutes 0.0.0.0:80->80/tcp
xibo_cms-web_1
6b1c6f85d1d5 xibosignage/xibo-xmr:release_1.8.2 “/entrypoint.sh” 5 minutes ago Up 5 minutes 0.0.0.0:9505->9505/tcp, 50001/tcp
xibo_cms-xmr_1

=============================================================================
xibo-vm:/opt/xibo# ll
total 112
drwxr-xr-x 3 root root 4096 Jun 29 10:31 ./
drwxr-xr-x 5 root root 4096 Jun 27 15:35 …/
-rw-rw-r-- 1 admin-xibo admin-xibo 1137 Jun 26 12:49 cms_custom-ports.yml.template
-rw-rw-r-- 1 admin-xibo admin-xibo 807 Jun 26 12:49 cms_remote-mysql.yml
-rwxrwxrwx 1 root root 1835 Jun 27 16:12 config.env*
-rw-rw-r-- 1 admin-xibo admin-xibo 2331 May 30 08:51 config.env.template
-rw-rw-r-- 1 admin-xibo admin-xibo 1861 Feb 22 16:09 config.env.template-remote-mysql
-rw-rw-r-- 1 admin-xibo admin-xibo 1133 Jun 26 14:04 docker-compose.yml
-rw-rw-r-- 1 admin-xibo admin-xibo 1133 Jun 26 14:04 docker-compose.yml.template
-rw-rw-r-- 1 admin-xibo admin-xibo 34520 Jun 22 2016 LICENSE
-rw-rw-r-- 1 admin-xibo admin-xibo 2088 Feb 22 08:43 README.md
drwxr-xr-x 4 root root 4096 Jun 29 10:31 shared/

I see you’re using a remote MySQL server.

Is there an existing Xibo database in the MySQL server that you’re connecting to? Or are you connecting to an empty database.

I suspect you’re connecting to an existing database, and have missed the steps outlined here:
http://xibo.org.uk/manual-tempel/en/upgrade_switch_to_docker.html

Specifically the section about 1/3 the way down the page which starts

Since we’re importing a non-Docker based installation, there’s a couple of additional steps to take which require direct modification of the database. If you’re running with an external database, then please run the SQL commands listed below directly on your remote database instead of running these commands from inside the Docker console.

Hi,

The problem was still there.
I stopped the installation with docker.
The classic installation works.

I must migrate database from 1.7.4 to 1.8.2 now…

I’m glad you were able to progress.

If you’ve gone for a custom install, then please ensure you setup XTR (essential) and XMR (optional, but advised) otherwise some of the CMS functionality won’t be available to you.

hello,

i am joining this thread as i have the same issue.

I made a fresh install under Debian 9.
I configured a custom port.
Everything seems to start without problem.

When i attempt to reach the cms page at localhost, it keeps complaining with the error “Library not writable”

I am not sure where the library path is and how to change it though.

I had a look at the config files where there are some paths that rings a bell but even after changing the permissions on those paths it doesn’t make any difference.

Any advice ?

thanks a lot

On a fresh install, the library path is set correctly for you to /var/www/cms/library/ which is where the container expects to see it.

Docker then maps that to a location on your servers filesystem defined in the docker-compose file - by default to the current working directory:

./shared/cms/library

So it’s that directory that you’d need to look at. When the container starts, it attempts to fix the permissions on that directory itself, so there shouldn’t be this issue. It implies something else is happening.

Is the server connected to the internet? If so, would I be able to get remote access so I can have a quick look? I can provide an SSH public key.

ok thanks for the information.

I don’t really understand the difference between the two paths you mention.

unfortunately my server is behind a firewall only accessible trough a VPN from outside.

i also have setup a custom port (80:80). I also notice that paths are also set in cms_custom_ports.yml so should i modify those if needed or the ones in docker-compose ?

attached some screenshots that i hope will help

this is my cms_custom_ports.yml

thanks a lot

You shouldn’t need to change the path in the docker compose file.

The shared directory got created OK.

What are the filesystem permissions on the shared/cms/library directory?

777 with user and group = www-data

hello,

i re-installer everything under Lubuntu 16.04 and everything seems ok now…

thanks

1 Like