MySQL Import Failure due to permission issue with /tmp/.webmin directory

OS type and version CentOS Linux 7.9.2009
Webmin version 1.991
Virtualmin version 7.0

The way virtualmin handles mysql imports is causing a failure while attempting to import CSV files into a DB table.

Scenario: Importing CSV data of a table using Virtualmin > Edit Databases > Manage xyz Database > Execute SQL > Import text file > selecting csv file either from local location or via upload.

/usr/bin/mysqlimport: Error: 13, Can't get stat of '/tmp/.webmin/table_name.txt' (Errcode: 2), when using table: table_name

Workaround: Using either mysql workbench from local desktop or even direct command line sql commands is able to import the csv into table.

Possible issue: mysql user does not have access to /tmp/.webmin folder hence the error. Instead of using the mysql directory, the virtualmin interface is using the temp webmin folder for the upload and hence creates a permission issue and the subsequent error. Importing works fine if attempted through other means as mentioned above that does not involve virtualmin/webmin.

Adding mysql user to the root group also did not help for some reason. The uploads were attempted both from the root user login as well as individual user account login.

Other Workarounds take care of security i rename files, use my ip only acces, and rename extension after use of those files.

Phpmyadmin is more work i guess.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.