I'm uploading a jpg using POST, using GD to re-size it and storing it in another folder. This all works great except that the resultant file has permissions set where it is only readable by the owner, and so can not be viewed through the website, only ftp.
I've used a similar method before, and had no problems. Does anyone know why this might be happening, and what I can do to fix it?
File access permissions
Moderator: General Moderators
- Buddha443556
- Forum Regular
- Posts: 873
- Joined: Fri Mar 19, 2004 1:51 pm
chmod the file?
Probably...
Probably...
Code: Select all
<?php
// Read and write for owner, read for everybody else
chmod("/somedir/somefile", 0644);
?>- Buddha443556
- Forum Regular
- Posts: 873
- Joined: Fri Mar 19, 2004 1:51 pm