clearmedia Posted June 19, 2008 Share Posted June 19, 2008 Hi happy freakers! I am need of a method to change permissions of text files on my server, so that my php scripts can still access (read/write) but so they cant be accessed by direct url... Thanks for any suggestions! Link to comment https://forums.phpfreaks.com/topic/110846-solved-setting-file-permissions-on-server/ Share on other sites More sharing options...
xtopolis Posted June 19, 2008 Share Posted June 19, 2008 Use your FTP client to set folder permissions. I use Filezilla, right click a folder, ->file attributes, and set them there. With PHP you can use chmod. Link to comment https://forums.phpfreaks.com/topic/110846-solved-setting-file-permissions-on-server/#findComment-568710 Share on other sites More sharing options...
bluejay002 Posted June 19, 2008 Share Posted June 19, 2008 well i was wondering when did people became freakin happy anyway, usually ftp clients help you set that up... am using fireFtp, one bundled with Firefox (am using Firefox 3 ). Link to comment https://forums.phpfreaks.com/topic/110846-solved-setting-file-permissions-on-server/#findComment-568715 Share on other sites More sharing options...
clearmedia Posted June 19, 2008 Author Share Posted June 19, 2008 Thanks for the replies folks. I actually need to set the permissions dynamically using a php script as the text files are created dyamically themsleves. I need to know how to chmod them at runtime.. Here's hoping! Link to comment https://forums.phpfreaks.com/topic/110846-solved-setting-file-permissions-on-server/#findComment-568739 Share on other sites More sharing options...
clearmedia Posted June 19, 2008 Author Share Posted June 19, 2008 All good! I realised I just needed to store the files outside of the _root directory and then access them with readfile($_SERVER['DOCUMENT_ROOT']."../textFiles/sometextfile.txt", 4096); hope this may help someone else though! thanks anyway Link to comment https://forums.phpfreaks.com/topic/110846-solved-setting-file-permissions-on-server/#findComment-568790 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.