0

I have a file /tmp/test.csv created by the mysql process (SELECT * INTO OUTFILE), thus having mysql:mysql ownership.

Problem: I'd like to rewrite the chmod from within the mysql console:

mysql --user=root --password=rootpw --database=$DB -e "system chown other:other /tmp/test.csv"

Result:

chown: changing ownership of '/tmp/test.csv': Operation not permitted

This is strange because the mysql proces actually owns the file, but why can't it be changed?

membersound
  • 154
  • 1
  • 10
  • @slhck so you're actually saying there is no solution to the `SELECT INTO OUTFILE` owner problem? – membersound Oct 31 '19 at 19:08
  • No, because the MySQL user does not have privileges to chown a file as someone else. You have to do it later on via superuser access. – slhck Nov 01 '19 at 10:39

0 Answers0