0perator Posted July 7, 2008 Share Posted July 7, 2008 how do i chmod my stuff so only apache and i can read and write them?? i have been playing round and i can install a shell and delete stuff from my dir please help thanks. Quote Link to comment https://forums.phpfreaks.com/topic/113572-shells/ Share on other sites More sharing options...
trq Posted July 7, 2008 Share Posted July 7, 2008 You need to make the files owned by the same user:group as apache. You can find out who this is by greping you httpd.conf file. grep User /etc/httpd.conf Once you know that information (I'll use www-data as an example)...... chown www-data:www-data /path/to/file chmod 600 /path/to/file Quote Link to comment https://forums.phpfreaks.com/topic/113572-shells/#findComment-583567 Share on other sites More sharing options...
0perator Posted July 7, 2008 Author Share Posted July 7, 2008 ah yes, but the files are in my home directory and i need to be able to write to them with apache for my cms... Quote Link to comment https://forums.phpfreaks.com/topic/113572-shells/#findComment-583572 Share on other sites More sharing options...
trq Posted July 7, 2008 Share Posted July 7, 2008 ah yes, but the files are in my home directory and i need to be able to write to them with apache for my cms... So what is your question again? There is no need (and in fact it is unsafe) to make the apache process able to write to most files within a php application. Quote Link to comment https://forums.phpfreaks.com/topic/113572-shells/#findComment-583625 Share on other sites More sharing options...
0perator Posted July 7, 2008 Author Share Posted July 7, 2008 the black and white of it is: i dont want people to change my stuff, or even be able to see it cos i have passwords for mysql in the database file. Quote Link to comment https://forums.phpfreaks.com/topic/113572-shells/#findComment-583630 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.