Hi,
My main 15.6 failed significantly on upgrade to Leap 16.0 so I am taking the opportunity to have a clean out and start with a clean slate.
I have a separate small PC to use as a system to sort out certain issues.
The biggest problem to date is not able to start the redis server (for Nextcloud) when selinux is enabled. I get a "Permission denied " error on /etc/redis/redis.conf
I have done somne reading and got as far as running
semanage fcontext -a -t redis_conf_t ‘/etc/redis/(/.*)?’
restorecon ‘/etc/redis’
saturn:/srv/www/htdocs/nextcloud/config # restorecon -nrv /etc/redis
Would relabel /etc/redis/redis.conf from unconfined_u:object_r:user_home_t:s0 to unconfined_u:object_r:redis_conf_t:s0
Hi arvidjaar,
That seems to have done it redis now starts. I rebooted and I am able to start redis.
Can I confirm which commands would need to be run for a new system?
1.semanage fcontext -a -t redis_conf_t ‘/etc/redis/(/.*)?’
2. touch /.autorelabel and then reboot - (is this still needed?)
3. restorecon -rv /etc/redis
If you created (copied, restored from backup, whatever) a file with a wrong context, you need to relabel this file. Either 2 or 3 should have worked. I do not know why the 2 did not work.
You can use matchpathcon to find out the expected security label:
So IF only I only need command 1 (semanage…) why did it not work originally ? Was it because I issued a [restorecon ‘/etc/redis’] command?
Anyway many thanks for the help and persevering with this.