Full-Demon Posted August 21, 2007 Share Posted August 21, 2007 Ey, I use CHMOD because .htaccess doesn't work on my server. I want certain directories to be restricted. I want that only apache/php can read/write/execute. Nobody else, users should not be able to browse to/inside the directory. What permissions should the directory have and what should the files/directories inside have? Thanks in advance FD Quote Link to comment https://forums.phpfreaks.com/topic/65978-solved-chmod-confusion/ Share on other sites More sharing options...
steviewdr Posted August 21, 2007 Share Posted August 21, 2007 1. Firstly find out the current permissions on your directory (as can be seen below). 2. Find out what "group" users are part of. It can be seen in the example below, that the owner is steviewdr, and the group is "users". steviewdr@skynet:~$ ls -la | grep public_html drwx-----x 21 steviewdr users 4096 2007-08-17 18:24 public_html Therefore we want to allow the owner (rwx), and the world/www (x). This is chmod 701. steviewdr@skynet:~$ chmod 701 public_html/ So: the user will be allowed to: read,write,execute the word will be allowed to: execute into the folder. The files inside public_html do not necessairly need to be chmod 701. It can if you like, by going: chmod -R 701 public_html. -steve Quote Link to comment https://forums.phpfreaks.com/topic/65978-solved-chmod-confusion/#findComment-329932 Share on other sites More sharing options...
Full-Demon Posted August 21, 2007 Author Share Posted August 21, 2007 Ok thanks mate Quote Link to comment https://forums.phpfreaks.com/topic/65978-solved-chmod-confusion/#findComment-330008 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.