Link to home
Create AccountLog in
Avatar of calmchess
calmchess

asked on

apache file permissions

i recently upgraded to apache 2.2.0 ...but when i moved my folders into var/www/html i couldn't see any files.....wrong file permissions on directories....(i know this because i created a new directory and it worked fine) ....so i chown -R root:root.....then I chmod -R 755 *.*
changed the permissions.....but i still can't get at the old directories.......what am i doing wrong?
Avatar of calmchess
calmchess

ASKER

here are the current permission for the directories i need to access


drwxr-xr-x  2 root root 4096 Apr 15 10:38 bin
drwxr-xr-x  2 root root 4096 Apr 16 21:08 test
drwxr-xr-x  9 root root 4096 Dec 31  1969 webserver
drwxr-xr-x 14 root root 4096 Dec 31  1969 webserver00
drwxr-xr-x  2 root root 4096 Dec 31  1969 webserver01
Avatar of Arty K
'wrong file permissions on directories' when do you get this message? While server starts? On your page? In webserver log files?
i get error 403 when i type in  localhost/webserver........if i type in localhost then i only see the test  directory because i created it new ...... so what commands  do i need to use to give the directories the correct permissions?
Now I see no problems with directory or file permissions.

It seems to me you need to edit your httpd.conf
First try to access full index filename (not directory): http://localhost/webserver/index.html or whatever
If it works, you need to fix Indexes option in config.

Please note, you cannot just create symlink to new directory from old location, since Apache doesn't follow them by default.
For doing that you need to turn on, in your httpd.conf:
Options Indexes FollowSymLinks

Nopius you can't read or something stop responding ...i've very clearly stated before that for some reason the "folder" permissions are somehow wrong therefore apache won't allow them to be displayed.
Yikes, guys and/or gals - I think everyone is trying to help here.  Nopius is trying to rule out a potential configuration file misconfiguration, which is decidedly a possibility.

When you say "i know this because i created a new directory and it worked fine", where did you create the directory?  Did you set up a new virtual host when it worked fine, or did you just create a directory under the existing directory structure?
Is there any more information in the error_log?
> i get error 403

and what can you find in your error.log? A lot of things can cause a 403...
calmchess:
drwxr-xr-x  9 root root 4096 Dec 31  1969 webserver
these permissions allows your webserver to access that durectories regardless of webserver userid. May be some directoryes above these don't have such permissions, I don't know.
error 403 often appeares when there is no Index page and directory browsing (in apache) is turned off. Also ther may be 'Allow from' restrictions or some kind of authorization. If it where worked before, then most probably it is an index or webroot physical location problem.

well i found the problem finally ........SELINUX is turned on in fedora core 5  therefore when i mv my old directories SELINUX refused to allow apache to use it.......so i moved all of the old directories into my home directory then cp (copied) to /var/www/html instead of moving the "old" directories....http://fedora.redhat.com/docs/selinux-apache-fc3/sn-simple-setup.html....A lesson for us all.
Great, calmchess. That's really non-obvious problem.
You may reclaim your points back, solution is found by yourself.
How do i close this question as  unacceptable?
LOL, it's not that the question is unexceptable;  but you should state that you've answered your own question, for the question to become a PAQ, and for your points to be refunded - this is very useful information!
ASKER CERTIFIED SOLUTION
Avatar of GranMod
GranMod

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer