#4 jicofo needs write permissions in /run/jicofo and /etc/jicofo
Closed by lcts. Opened by felfert.

When starting jicofo.service, in the logs, the following errors logged:

Jicofo 2021-01-30 12:58:35.485 SEVERE: [13] impl.configuration.ConfigurationActivator.log() Error creating c lib instance for fixing file permissions
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]: java.nio.file.FileSystemException: /etc/jicofo: Read-only file system
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at sun.nio.fs.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at net.java.sip.communicator.impl.configuration.ConfigurationActivator.fixPermissions(ConfigurationActivator.java:167)
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at net.java.sip.communicator.impl.configuration.ConfigurationActivator.start(ConfigurationActivator.java:88)
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at org.jitsi.impl.osgi.framework.BundleImpl.start(BundleImpl.java:307)
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at org.jitsi.impl.osgi.framework.launch.FrameworkImpl.startLevelChanged(FrameworkImpl.java:472)
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at org.jitsi.impl.osgi.framework.startlevel.FrameworkStartLevelImpl$Command.run(FrameworkStartLevelImpl.java:137)
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at org.jitsi.impl.osgi.framework.AsyncExecutor.runInThread(AsyncExecutor.java:122)
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at org.jitsi.impl.osgi.framework.AsyncExecutor.access$000(AsyncExecutor.java:28)
Jan 30 12:58:35 hostname.redacted.com jicofo.sh[1924862]:         at org.jitsi.impl.osgi.framework.AsyncExecutor$1.run(AsyncExecutor.java:231)

and:

Jan 30 12:58:39 hostname.redacted.com jicofo.sh[1924862]: Jicofo 2021-01-30 12:58:39.395 WARNING: [1] java.util.prefs.run() Couldn't create user preferences directory. User preferences are unusable.
Jan 30 12:58:39 hostname.redacted.com jicofo.sh[1924862]: Jicofo 2021-01-30 12:58:39.395 WARNING: [1] java.util.prefs.run() java.io.IOException: No such file or directory

After that, every 30 seconds, more warnings are logged:

Jan 30 12:59:10 hostname.redacted.com jicofo.sh[1924862]: Jicofo 2021-01-30 12:59:10.945 WARNING: [35] java.util.prefs.checkLockFile0ErrorCode() Could not lock User prefs.  Unix error code 2.
Jan 30 12:59:10 hostname.redacted.com jicofo.sh[1924862]: Jicofo 2021-01-30 12:59:10.947 WARNING: [35] java.util.prefs.syncWorld() Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock

This can be fixed by adding the following line in the [Service] section of
/usr/lib/systemd/system/jicofo.service

[Service]
ReadWritePaths=/run/jicofo /etc/jicofo

Thanks for reporting, I forgot to whitelist the rundir.
The config dir is a bit weird, because jicofo shouldn't need to write to it. Regardless, I added it to the service definition for now, and will look into this further/take it up with upstream.

Fixed in 2.0.5390-2

Metadata Update from @lcts:
- Issue status updated to: Closed (was: Open)

Metadata