Unable to browse /var/www/directory
cl at isbd.net
Mon Jul 18 16:14:15 UTC 2011
On Mon, Jul 18, 2011 at 12:00:27PM -0400, Amrit Pal Pathak wrote:
> First things to check to my mind are:-
> What is the value of FILE_CONFIG? It *might* point at a file
> somewhere else and not the config.php in the same directory as
> constants.inc (or anyway the file one *thinks* it's referring to).
> Then, what user is running apache (a ps will reveal this) and does
> that user have permission to access the config.php file?
> Well user is sudo and it has rights.I was accessing it without
> any problem in my previous installed ubuntu but in newly installed i
> didn't work.
Er, I think you're a little confused. There isn't a user 'sudo', that's
just a command for you to obtain root privileges from the command line.
What we need to know is what user the apache2 process is running as, you
need to run the command 'ps -ef | grep apache2' at the command line and
you will see several apache2 processes and their user, on my system I see:-
chris$ ps -ef | grep apache2
root 2025 1 0 Jul11 ? 00:00:13 /usr/sbin/apache2 -k start
www-data 3204 2025 0 Jul17 ? 00:00:27 /usr/sbin/apache2 -k start
www-data 3205 2025 0 Jul17 ? 00:00:25 /usr/sbin/apache2 -k start
www-data 3206 2025 0 Jul17 ? 00:00:29 /usr/sbin/apache2 -k start
www-data 3208 2025 0 Jul17 ? 00:00:24 /usr/sbin/apache2 -k start
www-data 3325 2025 0 Jul17 ? 00:00:24 /usr/sbin/apache2 -k start
www-data 8757 2025 0 13:17 ? 00:00:05 /usr/sbin/apache2 -k start
www-data 14863 2025 0 Jul17 ? 00:00:18 /usr/sbin/apache2 -k start
chris 15246 28508 0 17:11 pts/6 00:00:00 grep apache2
www-data 16057 2025 0 Jul17 ? 00:00:19 /usr/sbin/apache2 -k start
www-data 16081 2025 0 Jul17 ? 00:00:19 /usr/sbin/apache2 -k start
www-data 17541 2025 0 Jul17 ? 00:00:10 /usr/sbin/apache2 -k start
So apache2 is running as user www-data (which is normally what you will
see too). You need to check that the user www-data (if that's the user
you find running apache2) can access the file in question.
> Even it is browsing easily in my pals's systems.
More information about the ubuntu-users