Skip to content
Discussion options

You must be logged in to vote

the error is because www-data (apache/php user) doesnt have permission to write to the log file.

adminer sql-log plugin tries to write to the current directory by default which www-data cant access.

fix:

  1. create a log directory with proper permissions:
sudo mkdir -p /var/log/adminer
sudo chown www-data:www-data /var/log/adminer
sudo chmod 755 /var/log/adminer
  1. update the sql-log plugin config. edit /etc/adminer/conf.php:
new AdminerSqlLog("/var/log/adminer/sql.log")

instead of:

new AdminerSqlLog()
  1. create the log file:
sudo touch /var/log/adminer/sql.log
sudo chown www-data:www-data /var/log/adminer/sql.log
sudo chmod 644 /var/log/adminer/sql.log
  1. restart apache:
sudo systemctl restar…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by vrana
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants