shadiadiph Posted February 24, 2009 Share Posted February 24, 2009 I have a page which is in the secure part of my site. Each page starts with include("../checkadminlogin.php"); include("../../global/connection.php"); I am trying to put a link in that page that opens in a new window to some files the user uploaded <tr> <td class="norm"> <a href="../clients/<?=$username?>/<?=$idphoto?>"><?=$idphoto?></a> </td> <td class="norm"> <a href="../clients/<?=$username?>/<?=$idaddress?>" target="_new"><?=$idaddress?></a> </td> </tr> the new page opens the url is correct but I keep getting a forbidden 403 error You don't have permission to access /site/secure/admin/clients/johnny99/photid.jpg on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.website.com Port 80 the documents that are being called at definately there is there anyway i can get around this? Quote Link to comment Share on other sites More sharing options...
premiso Posted February 24, 2009 Share Posted February 24, 2009 Use .htaccess to set the error document or modify the apache http.conf file and set it there (.htaccess is probably a safer and easier bet). Google htaccess errordocument and you should find examples. EDIT: Re-read the post: Additionally, this can indicate a problem with your server. Verify that image is there and that the directory is accessible via web, if you have it setup to not be accessible via web you will need a script that can locate and readfile the image you want to grab. Quote Link to comment Share on other sites More sharing options...
shadiadiph Posted February 24, 2009 Author Share Posted February 24, 2009 just wondering is it my fault? when i made the directory i used mkdir("../secure/admin/clients/$username", 0700); Quote Link to comment Share on other sites More sharing options...
premiso Posted February 24, 2009 Share Posted February 24, 2009 just wondering is it my fault? when i made the directory i used mkdir("../secure/admin/clients/$username", 0700); Yes. That gives permission to the owner only. You would need to give read access to the public (the last 0) I am not sure what that is (5 or 6). Quote Link to comment Share on other sites More sharing options...
shadiadiph Posted February 24, 2009 Author Share Posted February 24, 2009 strange i used 700 when i told it to make the file but i just checked the permissions on core ftp and it says the permissions are already 755 readable by everyone so why won't it let me read files from it the permissions are set to the same values as say my images diectory that i created ?? Quote Link to comment Share on other sites More sharing options...
shadiadiph Posted February 24, 2009 Author Share Posted February 24, 2009 i just opened the .htaccess file from my html root directory and it is blank Quote Link to comment Share on other sites More sharing options...
shadiadiph Posted February 24, 2009 Author Share Posted February 24, 2009 oops you were right the clients file was set to 755 the ones unside username files were 700 i changed it to 755 works now thanks premiso your comments did help thanks I guess iam too tired the birds have just woken up. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.