We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

apache file permissions

calmchess
calmchess asked
on
Medium Priority
187 Views
Last Modified: 2010-03-04
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?
Comment
Watch Question

Author

Commented:
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
Artysystem administrator
Top Expert 2007

Commented:
'wrong file permissions on directories' when do you get this message? While server starts? On your page? In webserver log files?

Author

Commented:
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?
Artysystem administrator
Top Expert 2007

Commented:
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

Author

Commented:
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.
CERTIFIED EXPERT

Commented:
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?
CERTIFIED EXPERT

Commented:
Is there any more information in the error_log?
Top Expert 2008

Commented:
> i get error 403

and what can you find in your error.log? A lot of things can cause a 403...
Artysystem administrator
Top Expert 2007

Commented:
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.

Author

Commented:
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.
Artysystem administrator
Top Expert 2007

Commented:
Great, calmchess. That's really non-obvious problem.
You may reclaim your points back, solution is found by yourself.

Author

Commented:
How do i close this question as  unacceptable?
Artysystem administrator
Top Expert 2007

Commented:
http://www.experts-exchange.com/Community_Support/
go here and ask to refund points
CERTIFIED EXPERT

Commented:
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!
Commented:
Closed, 500 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.