I have installed Minio server on a Centos 7.9 and I am trying to run it as a service.
I used this guide and the minio.service file it provided to install Minio as a service: https://www.centosblog.com/install-configure-minio-object-storage-server-centos-linux/
Now when I try to enable the service I receive the following error. Could someone please kindly help?
[root@danesh bin]# systemctl enable minio.service
** (pkttyagent:38702): WARNING **: 22:50:16.320: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject
Error registering authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject (polkit-error-quark, 0)
Starting the service:
[root@danesh bin]# systemctl start minio.service
** (pkttyagent:43010): WARNING **: 23:06:46.143: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject
Error registering authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject (polkit-error-quark, 0)
Job for minio.service failed because a configured resource limit was exceeded. See "systemctl status minio.service" and "journalctl -xe" for details.
2
Answers
It turned out to be because of "Secure processes" in Centos. It supposedly hides all Linux processes not owned by the user.
I had CWP control panel so I went to "Secure processes" section of the panel and temporarily disabled it. After enabling the service you can re-enable it.
You have to set
permissive
mode toSELINUX
. Open the following file in the command line:Then change the following value:
And finally, reboot the OS:
After you enable
minio.service
, don’t forget to setenforcing
toSELINUX
again.