Comments - Mariadb upgrade problem

1 year, 1 month ago Daniel Black

So error 13 is a permission denied.

I'd normally assume Systemd's ProtectHome however you seem to be on /var/lib/mysql.

Ensure the [[selinux/#file-system-permission-errors|selinux content] of the /var/lib/mysql directory is correct with:

restorecon -Rv /var/lib/mysql

After trying a restart after that, if unsuccessful look at /var/log/audit/audit.log to see if selinux is block other interactions. It might be the file label on mariadbd executable isn't correctly.

 
1 year, 1 month ago Ted To

I tried:

restorecon -Rv /var/lib/mysql

and am still getting the same error. As far as I can tell, my file permissions are also fine.

$ ls -la /var/lib/mysql
total 436380
drwxr-xr-x 12 mysql mysql      4096 Mar 23 20:06 .
drwxr-xr-x 51 root  root       4096 Mar 23 09:41 ..
-rw-rw----  1 mysql mysql     90112 Mar 23 20:06 aria_log.00000001
-rw-rw----  1 mysql mysql        52 Mar 23 20:06 aria_log_control
drwx------  2 mysql mysql      4096 Mar 23 10:10 gitea
-rw-rw----  1 mysql mysql      2695 Mar 23 20:06 ib_buffer_pool
-rw-rw----  1 mysql mysql 346030080 Mar 23 20:06 ibdata1
-rw-rw----  1 mysql mysql 100663296 Mar 23 20:06 ib_logfile0
drwx------  2 mysql mysql      4096 Dec 14 15:34 mhc
-rw-rw----  1 mysql mysql         0 Mar 23 09:46 multi-master.info
drwx------  2 mysql mysql      4096 Mar 23 10:06 mysql
srwxrwxrwx  1 mysql mysql         0 Mar 23 20:06 mysql.sock
drwx------  2 mysql mysql      4096 Mar 23 10:06 performance_schema
 
1 year, 1 month ago Ted To

I have selinux disabled:

$ cat /etc/selinux/config 

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

but if `restorecon -Rv /var/lib/mysql` isn't potentially damaging, I'll give it a try.

 
1 year ago Daniel Black

retorecon changes the extended attributes on the files only.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.