My program that's running on Ubuntu 18.04 executes a select statement into outfile into my /home/tmp directory, but all files that are created by mysql are locked. I can manually unlock them but our program needs to read the file right after they are created, so I need them to be unlocked upon creation.
I've already set the folder permissions to 777, but still, any newly created files are locked. The files are owned by mysql server and have no access rights for "Others" users. I can't change these permissions as they are not owned by me.
the mysql server that's running is v8.0.18
In my.cnf, I have set secure_file_priv to this /home/tmp folder path.
We have the same program running with mysql server 5.7.27 on another computer and the files are not locked on there, so I'm not sure what the problem is.
Please help! Thanks.
- by "locked" I mean the file has a padlock symbol on the icon when viewing it in files.
- the error message I get when trying to open the file says "Access to "/home/tmp/filename" was denied.
- my select statement is something like " SELECT * INTO OUTFILE '/home/tmp/file.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM device "