I have an upload script that works fine, but now the server admin changed it so the saved files don’t have the correct permissions. I want everything to be 644 (user rw everyone else r). now when it is uploaded it saves as 600 so no one can see it. This script uploads pdf files to a directory that users can view using the website.
How do I get my script to make the correct permissions?
[code=php]
$newfilename = $_FILES[‘thefile’][‘name’];
$source = $_FILES[‘thefile’][‘tmp_name’];
$target = “bulletins/” . $newfilename;
echo “<h2>Uploaded</h2>”;
**Edit
So basicaly I get the file from the user that uploaded it, then put it into a folder that I want the users of the website to be able to download. This system allows someone with no website experence to upload weekly pdf files that users can then view on the website. The problem is it (the php script) has write premissions to that file, but users that view the website do not have the premission to view the file.
What I could do is just use a php script to get the php file and stream it using the content deposition header (or whatever it is, i have it some where) but i would prefer just to allow the users to download the files