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 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 with the following error:
mysqld: 120203 10:03:09 [ERROR] Can't open shared library '/usr/lib/mysql/plugin/' (errno: 22 cannot open shared object file: Permission denied)

The file is a symlink to 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
lrwxrwxrwx 1 root root 17 2012-02-03 10:04 ->
lrwxrwxrwx 1 root root 17 2012-02-03 09:21 ->
-rwxr-xr-x 1 root root 19620 2012-02-03 09:21

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 symlink to a hard link but also failed to load it.

Any ideas what could be the problem?

Question information

English Edit question
MariaDB Edit question
No assignee Edit question
Solved by:
Theodotos Andreou
Last query:
Last reply:
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.


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