Deleting file created from mysql
The file's owner group is mysql. Please use the id
command to find out another user of that group and try deleting it. It appears that the user ID you are using to delete the file may not have write access on tmp directory.
Are you able to truncate the contents of the file? Please do this only if you don't want the results.out file in /tmp/
echo " " > /tmp/results.out
Related videos on Youtube
Alagappan Ramu
Software Developer! 💻 Amateur photographer! 📷 Runner!🏃 Traveler! 🌍 NIT Trichy & SUNY Buffalo Alum! Delhi - Chennai - New York - San Diego
Updated on June 05, 2022Comments
-
Alagappan Ramu almost 2 years
I executed the query in mysql as
select * into outfile "/tmp/results.out" from table_x;
which in-turn wrote all the records in that table to the file in /tmp directory. The file was created with the following permissions.
-rw-rw-rw- 1 mysql mysql 6.6K Nov 14 10:14 /tmp/results.out
I know that it is not possible to delete this file from my login. But I tried removing this from MySQL, but I get the following error message:
mysql> system rm /tmp/results.out rm: cannot remove `/tmp/results.out': Operation not permitted
PS: I do not have root permissions.