uluru75 Posted June 20, 2010 Share Posted June 20, 2010 Hi, I'm using DOMDocument and SimpleXMLElement to create, update, delete or just reading xml files. Currently they (files and dir) have all user rights. However, when i remove the rights my php files cannot access them. So, if i provide username and pass how the php can access xml files that have only owner permissions? Should that be done by some shell scripts thus shell_exec? or is there simpler way? Quote Link to comment https://forums.phpfreaks.com/topic/205339-how-php-can-access-restricted-xml-file/ Share on other sites More sharing options...
ram4nd Posted June 20, 2010 Share Posted June 20, 2010 Just change the permissions so it would work. Quote Link to comment https://forums.phpfreaks.com/topic/205339-how-php-can-access-restricted-xml-file/#findComment-1074690 Share on other sites More sharing options...
uluru75 Posted June 20, 2010 Author Share Posted June 20, 2010 But then the xml files will be directly accessible which i dont want. Quote Link to comment https://forums.phpfreaks.com/topic/205339-how-php-can-access-restricted-xml-file/#findComment-1074705 Share on other sites More sharing options...
Alex Posted June 20, 2010 Share Posted June 20, 2010 If you want to access the file through a PHP script but don't want it to be directly accessible then just put it outside your document root. Quote Link to comment https://forums.phpfreaks.com/topic/205339-how-php-can-access-restricted-xml-file/#findComment-1074725 Share on other sites More sharing options...
uluru75 Posted June 20, 2010 Author Share Posted June 20, 2010 good idea, thanks a lot Quote Link to comment https://forums.phpfreaks.com/topic/205339-how-php-can-access-restricted-xml-file/#findComment-1074741 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.