I'm trying to load a /etc/flag
file using mysql LOAD_FILE
function, but it returns null
. I've created this file by copying passwd file like this cp /etc/passwd /etc/flag
, then I've given it permissions that are exactly the same as the permissions of passwd file chmod 644 /etc/flag
.
-rw-r--r-- 1 root root 1806 Dec 15 18:29 /etc/flag
-rw-r--r-- 1 root root 1806 Dec 15 18:04 /etc/passwd
The result of SELECT LOAD_FILE('/etc/passwd')
is the contents of the passwd file.
The result of SELECT LOAD_FILE('/etc/flag')
is NULL
What can be the other difference between /etc/passwd
and /etc/flag
that one loads and the other does not?
My MySQL version is mysql Ver 8.0.27-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))