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?