optikalefx Posted April 11, 2010 Share Posted April 11, 2010 i have a folder /downloads what permissions do i need on that folder that will make it so you can't navigate to it, or any files in it. but using php you can read, and use move_uploaded_files Link to comment https://forums.phpfreaks.com/topic/198182-how-to-fix-permissions/ Share on other sites More sharing options...
trq Posted April 11, 2010 Share Posted April 11, 2010 You would need to have /downloads stored above your sites document root, then just make sure the web server has permissions to access it. Link to comment https://forums.phpfreaks.com/topic/198182-how-to-fix-permissions/#findComment-1039851 Share on other sites More sharing options...
optikalefx Posted April 12, 2010 Author Share Posted April 12, 2010 is there anyway without moving the folder? Im using an integrated solution, and its a pain to move the folder which means ill have to find everywhere in the code that references that folder. :/ Link to comment https://forums.phpfreaks.com/topic/198182-how-to-fix-permissions/#findComment-1040183 Share on other sites More sharing options...
trq Posted April 12, 2010 Share Posted April 12, 2010 If you make the folder unreadable by the server it will be unreadable by the server, so no. Link to comment https://forums.phpfreaks.com/topic/198182-how-to-fix-permissions/#findComment-1040184 Share on other sites More sharing options...
optikalefx Posted April 12, 2010 Author Share Posted April 12, 2010 lol, yes, i just want directory browsing to the files to restricted. The server needs to read and write, but people can't surf to the downloads directory or get files. can't permissions or htaccess handle that? Link to comment https://forums.phpfreaks.com/topic/198182-how-to-fix-permissions/#findComment-1040186 Share on other sites More sharing options...
trq Posted April 12, 2010 Share Posted April 12, 2010 can't permissions or htaccess handle that? No, because if you lock the directory from access by clients you also lock the server out from accessing the directory. The directory needs to be moved outside of your web root. Link to comment https://forums.phpfreaks.com/topic/198182-how-to-fix-permissions/#findComment-1040191 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.