I have a script that worked fine for more than a year. Suddenly it started making problems. I think it started after server update.
What happens is that, when file is uploaded through the form, it gets 600 atribute so it is not accessible via web. I even tried to force 644 after saving file, but it remains 600.
Each time my client uploads file he must access file through FTP to change file attribute manualy and that is very annoying, both for him and me.
Is there something I can do to allow files to be visible?
Code I use is like this:
What happens is that, when file is uploaded through the form, it gets 600 atribute so it is not accessible via web. I even tried to force 644 after saving file, but it remains 600.
Each time my client uploads file he must access file through FTP to change file attribute manualy and that is very annoying, both for him and me.
Is there something I can do to allow files to be visible?
Code I use is like this:
Code:
if (! move_uploaded_file($_files['f_uploadedfile']['tmp_name'], $putfile)) {
return 0;
}
} else {
chmod($putfile, 664);
return 1;
}
Comment