mkdir(): Permission denied in phpMyAdmin is usually a runtime filesystem policy issue, not just a chmod issue.
Diagnose
ps aux | grep php-fpm
php -i | grep -E 'upload_tmp_dir|sys_temp_dir|open_basedir'
ls -ld /tmp
ls -ld /var/lib/php/sessions
Fix
chown -R www-data:www-data /var/lib/php/sessions
chmod 1733 /var/lib/php/sessions
If needed, extend open_basedir to include the temp/session path and restart PHP-FPM.
Validate
- retry import/upload in phpMyAdmin;
- check PHP-FPM/web logs for new denies.
Final takeaway
The right fix is runtime alignment: executing user, writable temp path, and allowed path policy.
This post is licensed under CC BY-NC.
Comments
Join the discussion below.
Comments are not configured yet. Add Cusdis settings in /assets/json/config/blog-comments-config.json.