PDA

View Full Version : Quick Linux Question.



Jack!
30-09-2012, 07:04 PM
Hi!

Basically, Running a CentOS Sever, trying to get phpmyadmin running, but, here is the catch.

I have installed it all, and phpmyadmin is installed in:

/usr/share/phpmyadmin

When I go to myip/phpmyadmin I get a 403 Error.

The owner of all the files is root, but I have disabled root access, what do I need to do to fix it?

I followed this guide: http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-centos-6.2-lamp

I did everything apart from change the cookie to http as I don't have access to that due to permissions, how can I fix it?

P.S What hardening do you recommend? I have changed the SSH Port, Disabled root, installed csf, not sure what else I should do really.

Recursion
30-09-2012, 07:07 PM
Root shouldn't own them, the user running the webserver server won't be able to access them.

EDIT: Also, your web server logs in /var/log/ can help you here.

tail -f /var/log/httpd.xxx.whatever

then reload the page you're getting 403 on to see the errors.

Jack!
30-09-2012, 07:14 PM
Root shouldn't own them, the user running the webserver server won't be able to access them.

EDIT: Also, your web server logs in /var/log/ can help you here.

tail -f /var/log/httpd.xxx.whatever

then reload the page you're getting 403 on to see the errors.

How can I change them from root though?

I don't have permission to get into /var/log/httpd

:(

Recursion
30-09-2012, 07:19 PM
Put sudo before the command to get temporary root.

Also I assume your HTTPd group is www-data, so do:



chown -R root:www-data /directory/for/phpmyadmin/files

Jack!
30-09-2012, 07:27 PM
Put sudo before the command to get temporary root.

Also I assume your HTTPd group is www-data, so do:



chown -R root:www-data /directory/for/phpmyadmin/files



chown: invalid group: `root:www-data'


Nope, lmao, says root root for everything in filezilla.

Jack!
30-09-2012, 10:50 PM
chown: invalid group: `root:www-data'


Nope, lmao, says root root for everything in filezilla.

Okay, got past that, new issue;

Existing configuration file (./config.inc.php) is not readable.

---------- Post added 01-10-2012 at 12:02 AM ----------

And I fixed it, somehow, meh, thanks for trying to help.

Want to hide these adverts? Register an account for free!