auth_pam fails to load with "permission denied"

Asked by Theodotos Andreou on 2012-02-03

Hi to all

I compiled the latest stable (5.2.10) version of mariadb from source. My intention was to get the auth_pam.so plugin which was not included in the official debs.

I used these flags:
./configure --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/sbin --with-plugins=max-no-ndb --without-docs --with-charset=utf8 --with-collation=utf8_general_ci

The bins compiled correctly and the mysqld start but fails to load auth_pam.so with the following error:
mysqld: 120203 10:03:09 [ERROR] Can't open shared library '/usr/lib/mysql/plugin/auth_pam.so' (errno: 22 cannot open shared object file: Permission denied)

The file auth_pam.so is a symlink to auth_pam.so.0.0.0 and does have read and execute permissions for all:

root@serv:/usr/lib/mysql/plugin# ls -l auth_pam*
-rw-r--r-- 1 root root 14586 2012-02-03 09:21 auth_pam.a
-rwxr-xr-x 1 root root 1047 2012-02-03 09:21 auth_pam.la
lrwxrwxrwx 1 root root 17 2012-02-03 10:04 auth_pam.so -> auth_pam.so.0.0.0
lrwxrwxrwx 1 root root 17 2012-02-03 09:21 auth_pam.so.0 -> auth_pam.so.0.0.0
-rwxr-xr-x 1 root root 19620 2012-02-03 09:21 auth_pam.so.0.0.0

I even tried to change the ownership of the destination file to mysql user but that didn't help. I also tried to change the auth_pam.so symlink to a hard link but also failed to load it.

Any ideas what could be the problem?

Question information

Language:
English Edit question
Status:
Solved
For:
MariaDB Edit question
Assignee:
No assignee Edit question
Solved by:
Theodotos Andreou
Solved:
2012-02-06
Last query:
2012-02-06
Last reply:
2012-02-03
Sergei Golubchik (sergii) said : #1

frankly speaking, I've never seen that before.
Can you load any other plugin? Is everything ok with permissions on /usr/lib/mysql/plugin, /usr/lib/mysql, etc?

Theodotos Andreou (theodotos) said : #2

You were right! The permission on the /usr/lib/mysql and /usr/lib/mysql/plugin were 700! I am not sure how this happened but after that I was able to load the plugin correctly.

Thanks Sergei. That solved my problem.

P.S.

I still have problems with auth_pam but I will use a different question for those.