1
I have my site hosted on Godaddy and on this site I have a part for uploads, this worked well until days ago, now started returning the error 6 - Missing a Temporary Folder for any file I try to upload, I tried several ways to resolve by changing php.ini and still nothing.
In my PHP file if I use the command file_exists(sys_get_temp_dir());
returns me true, so the folder is there.
If I use the command is_writable(sys_get_temp_dir());
return me false, maybe there is the problem, but the folder /tmp from my server (which is the one that is configured, the default) is with the permission drwxrwxrwt.
.
If anyone can help me in this problem, since I followed several tutorials and nothing of the solution.
What appears when you spin it:
$ ls -l /tmp
– Kayo Bruno
Give me a list of files and folders, as it is enough I will update my question with the data that appear there.
– Gabriel Queiroz Schicora
Friend I think you put a bar at the end of the command I mentioned, and it returned the list of what is inside the folder
/tmp
. The command$ ls -l /tmp
it was to return something more or even so:lrwxrwxrwx@ 1 root admin 11 Nov 18 23:55 /tmp -> private/tmp
– Kayo Bruno
If the folder permissions are not
lrwxrwxrwx
the problem should be just that, if it is already so then check in yourphp.ini
if it really is using the directory/tmp
.– Kayo Bruno
@Kayobruno with the command you told me it shows what’s inside the folder, if I give one
ls -l /
it returns me the data from that /tmp folder and the return isdrwxrwxrwt. 14 root root 4096 Mar 12 02:23 tmp
– Gabriel Queiroz Schicora
Opa @Gabrielqueirozschicora see if this helps you https://stackoverflow.com/questions/29343809/php-is-writable-function-always-returns-false-fora-writable-directory
– Thiago Costa
@When I executed the cameo
sudo chcon -R -t httpd_sys_rw_content_t /tmp
gave me several warnings talkingchcon: can't apply partial context to unlabeled file ‘NOME_DO_ARQUIVO’
where NOME_DO_ARQUIVO is the name of the intended folder files/tmp
and finally the messagechcon: failed to change context of ‘/tmp’ to ‘system_u:object_r:httpd_sys_rw_content_t:s0’: Read-only file system
.– Gabriel Queiroz Schicora
I had seen several people talking to give one
chmod 777 /tmp
and I would, but you mistake me for being aRead-only file system
, then I saw people talking to do mount e remount (I don’t know these linux commands well) but also me error that can not run remount in this folder.– Gabriel Queiroz Schicora
In the second reply of the link you sent me, it says to use sestatus to see the status of Selinux (I also don’t know what it’s for) but it is as disabled, this should be enabled?
– Gabriel Queiroz Schicora