[MDEV-26894] MariaDB deployment failed due to permission issue Created: 2021-10-25  Updated: 2021-10-25  Resolved: 2021-10-25

Status: Closed
Project: MariaDB Server
Component/s: Authentication and Privilege System, Storage Engine - Aria
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Satheeshkumar Kandasamy Assignee: Sergei Golubchik
Resolution: Cannot Reproduce Votes: 0
Labels: None

Attachments: Text File mysqld.log     File mysqld.site    

 Description   

Hi,

We are trying to install MariaDB 10.3.27 in Customer Pre-Production environment (VNF).

Getting failed with permission denied error when run the bootstrap.sh script.

Selinux policy is disabled and umask also having 022.

Also we have given the 755 for /data folder. Still having the issue.

-bash-4.2# systemctl status mariadb -l
● mariadb.service - MariaDB 10.3.27 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─mariadb-alt.conf, migrated-from-my.cnf-settings.conf
   Active: failed (Result: exit-code) since Fri 2021-10-22 18:08:17 UTC; 3s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 3891 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 3695 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 3692 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 3891 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"
 
Oct 22 18:08:16 btc-mdb-01 systemd[1]: Starting MariaDB 10.3.27 database server...
Oct 22 18:08:17 btc-mdb-01 mysqld[3891]: 2021-10-22 18:08:17 0 [Note] /usr/sbin/mysqld (mysqld 10.3.27-MariaDB-log) starting as process 3891 ...
Oct 22 18:08:17 btc-mdb-01 mysqld[3891]: 2021-10-22 18:08:17 0 [Warning] Can't create test file /data/mdb_data/btc-mdb-01.lower-test
Oct 22 18:08:17 btc-mdb-01 mysqld[3891]: [90B blob data]
Oct 22 18:08:17 btc-mdb-01 mysqld[3891]: 2021-10-22 18:08:17 0 [ERROR] Aborting
Oct 22 18:08:17 btc-mdb-01 systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Oct 22 18:08:17 btc-mdb-01 systemd[1]: Failed to start MariaDB 10.3.27 database server.
Oct 22 18:08:17 btc-mdb-01 systemd[1]: Unit mariadb.service entered failed state.
Oct 22 18:08:17 btc-mdb-01 systemd[1]: mariadb.service failed.
-bash-4.2#



 Comments   
Comment by Satheeshkumar Kandasamy [ 2021-10-25 ]

Hi,

I have resolved this issue. Please close this ticket

Comment by Anel Husakovic [ 2021-10-25 ]

Hi satheesh thanks, can you please explain more what was the solution?

Comment by Satheeshkumar Kandasamy [ 2021-10-25 ]

Hi Husakovic,

mysql Permission was not there for data directory (/data). Actually we created data folder as /data/mdb_data and provided the permission. Generally we used the below command to provide the permission for /data folder
chown -R mysql:mysql /data/mdb_data

but here it's not reflected in data folder. We found this issue and change the ownership specifically for /data.
chown -R mysql:mysql /data
chmod -R 755 /data

Comment by Anel Husakovic [ 2021-10-25 ]

Ok thanks satheesh.

Generated at Thu Feb 08 09:48:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.