PDA

View Full Version : how to set apache to work with all users?


pedrotuga
December 22nd, 2005, 10:12 AM
Hey all!

This is a very basic question.

how do i set apache to serv the files in every user's public_html do

http://myserver.com/~user/

?

LordHunter317
December 22nd, 2005, 12:32 PM
Assuming apache2, enable mod_userdir:sudo a2enmod userdirBut it should already be. Users will need world access ('x') bits on the their /home directory and world read and access ('rx') on their public_html directory.

pedrotuga
December 22nd, 2005, 02:17 PM
mmm...
lets see...

i should use chmod right?
should i like:

chmod 666 public_html
?

or.. something else than 666?
i allways mix up wich pirmitions should i give

pedrotuga
December 22nd, 2005, 02:22 PM
BTW, tank you hunter i think it should be on.. lets try change the pirmisions

LordHunter317
December 22nd, 2005, 08:51 PM
No. Never give 666 or 777 permissions.

On the home directory, you want at least 701. On public_html and directories below you want at least 705. On the files inside public_html you want [i]at leas[t/i] 604.

pedrotuga
February 23rd, 2006, 01:14 AM
What da heck...


Forbidden

You don't have permission to access /~pedro/index.htm on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

The module is already on. I chmoded the dir 755. And still this is not working. Apache is runing well for the main directory. but this users this is not :(

what can it be?

Eternal Blade
February 23rd, 2006, 05:00 PM
The error you got came from the lack of permission for the user to access your index.html. When you granted permissions to the directory did you also go in and grant permissions for the files in the directory?

pedrotuga
February 24th, 2006, 12:27 AM
yes i did.... i think i a m missing something somewhere.