For my final Project, my website has a feature that uploads files and displays them. So there is a folder in the public directory that stores those files.

But the main problem is that after each upload, I have to manually change the privacy of that particular file, otherwise it gives me error 403 Forbidden.

Can anyone please tell me how to make it world readable automatically, without me manually updating it each time?


Using php command - chmod($target_path, 0644);


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .