PDA

View Full Version : Attachments Not working


FReeSTER
08-22-2011, 06:06 PM
Im getting this error when I click on any attachment on the forum.

Warning: fopen(/home/myfreene/public_html/forums/attachment/1/1/121.attach) [function.fopen]: failed to open stream: Permission denied in [path]/attachment.php on line 252

any idea how to fix it?

kh99
08-22-2011, 06:26 PM
I think you need to make sure all the files under /home/myfreene/public_html/forums/attachment are readable by whatever user that the web server runs as (and maybe change them to be owned by that user, if they aren't already). Also, the directories need to have the right permissions.

I don't know why that would be happening - you may also need to change the mask used to set permissions for newly created file.

FReeSTER
08-22-2011, 06:45 PM
Ok fixed it by adding them to the database but one I try to move them back to the filesystem I get this
We attempted to write a test file to /home/myfreene/public_html/forums/attachments, but we were unsuccessful. Please verify that the web server has write/delete permissions for this path.
I did chmod the folder to 0777 and still get that error

kh99
08-22-2011, 06:49 PM
If you look now, are the permissions still the same for that folder, and if there are any subfolders that have been created, do they have the correct permissions?

FReeSTER
08-22-2011, 06:52 PM
all the folders and files inside the attachment folder are set to 0777 yes.
But since it was not letting me use the same folder I try a new folder attachments with permissions set to 0777 as well but I get the same massage on both