LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Permission Denied Error? (https://www.linuxquestions.org/questions/linux-newbie-8/permission-denied-error-774677/)

your_shadow03 12-10-2009 02:53 AM

Permission Denied Error?
 
I have installed cacti through:
Code:

yum install cacti
And it installed under /usr/share/cacti folder.

I am able to open the cacti page through http://localhost/cacti through htmlview command(commandline interface). But when I try opening it under Windows it says: "Permission Denied".

I guess the issue is due to httpd.conf DocumentRoot Setting:
I am having DocumentRoot as of now under /var/www/html.
<Directory /var/www/html>
There is a seperate webpage project specific which is already running under /var/www/html.
How can I add for cacti on this to work?

How can I make it work?

bathory 12-10-2009 07:02 AM

You can use an Alias:
Code:

Alias /cacti "/usr/share/cacti"
<Directory /usr/share/cacti">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

Just make sure, if you're using a SELinux enabled distro, that apache can read from /usr/share

Regards

your_shadow03 12-10-2009 07:07 AM

I made the entry and it displayed:

Code:

Starting httpd: [Thu Dec 10 13:06:01 2009] [warn] The Alias directive in /etc/httpd/conf/httpd.conf at line 547 will probably never match because it overlaps an earlier Alias.
                                                          [  OK  ]


bathory 12-10-2009 07:30 AM

Check httpd.conf or the other *.conf files that are included, to see if the Alias is already defined somewhere. I guess it should be, as you used yum to install cacti, so it should have take care to create the Allias.
Another thing to check (appart from SELinux) are the dir permissions, that should be 755 for the directories /usr, /usr/share, /usr/share/cacti.

your_shadow03 12-10-2009 01:01 PM

Yes. The httpd log says:
Code:

service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: [Thu Dec 10 18:55:34 2009] [warn] The Alias directive in /etc/httpd/conf/httpd.conf at line 547 will probably never match because it overlaps an earlier Alias.
                                                          [  OK  ]

I checked at line 547 and it do have Alias entry:
Code:

[root@tlmonitors ~]# cat /etc/httpd/conf/httpd.conf|grep Alias
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
Alias /icons/ "/var/www/icons/"
#Alias /cacti "/usr/share/cacti"
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# To use CGI scripts outside of ScriptAliased directories:
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
#  Alias /error/include/ "/your/include/path/"
Alias /error/ "/var/www/error/"


bathory 12-10-2009 01:38 PM

Which is the line 547 of httpd.conf? There are 2 uncommented Alias directives: "Alias /icons/ "/var/www/icons/" and "Alias /error/ "/var/www/error/", but anyway they have nothing to do with cacti. Comment out the offending line, uncomment the cacti Alias, restart apache and see if it works.


All times are GMT -5. The time now is 03:27 AM.