[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

apache file permissions

Posted on 2006-04-16
16
Medium Priority
?
171 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?
0
Comment
Question by:calmchess
  • 5
  • 5
  • 3
  • +2
15 Comments
 

Author Comment

by:calmchess
ID: 16466748
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
0
 
LVL 27

Expert Comment

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

Author Comment

by:calmchess
ID: 16466976
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?
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
LVL 27

Expert Comment

by:Nopius
ID: 16467071
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

0
 

Author Comment

by:calmchess
ID: 16468835
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.
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 16468875
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?
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 16468885
Is there any more information in the error_log?
0
 
LVL 27

Expert Comment

by:caterham_www
ID: 16469963
> i get error 403

and what can you find in your error.log? A lot of things can cause a 403...
0
 
LVL 27

Expert Comment

by:Nopius
ID: 16473716
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.

0
 

Author Comment

by:calmchess
ID: 16474249
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.
0
 
LVL 27

Expert Comment

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

Author Comment

by:calmchess
ID: 16475104
How do i close this question as  unacceptable?
0
 
LVL 27

Expert Comment

by:Nopius
ID: 16475230
http://www.experts-exchange.com/Community_Support/
go here and ask to refund points
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 16477464
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!
0
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16516739
Closed, 500 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month19 days, 7 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question