LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I made a mistake changing my /home/username/pubIic_html/ ownership to username:user (https://www.linuxquestions.org/questions/linux-newbie-8/i-made-a-mistake-changing-my-home-username-pubiic_html-ownership-to-username-user-4175412454/)

Sionek2u 06-20-2012 07:14 AM

I made a mistake changing my /home/username/pubIic_html/ ownership to username:user
 
Please could someone help me. I do have a dedicated linux server and my root document is /home/melieco/public_html. I issued this command "chown -R melieco:melieco /home/melieco/public_html/ and after this I could not access my domain from the browser. I do have internal errors and php_admin_flag errors.

skipper123 06-20-2012 09:09 AM

If you are running apache, than it must be running under the username 'apache'. All the stuff that sits on '/home/melieco/public_html/' should be owned by apache username and apache group (If you are running apache httpd server)

Do the following on the command line: (If you have apache httpd server)

chown -R apache:apache /home/melieco/public_html/

Hope this helps

descendant_command 06-20-2012 09:25 AM

It doesn't and shouldn't be owned by the webserver user.
It just needs to be readable by apache.

rosehosting.com 06-20-2012 09:28 AM

The following command will print out the user and group of the Apache web server:

Quote:

egrep -i '^user|^group' /etc/httpd/conf/httpd.conf
or
Quote:

egrep -i '^user|^group' /etc/apache2/apache2.conf
Then, execute

Quote:

chown -R user:group /path/to/your/documentroot/directory/

Sionek2u 06-20-2012 09:36 AM

Hi Skipper123,
I do appreciate your help. I have done it and the error I received now is that " You have chosen to open
Which is a: application/x-httpd-php(111 bytes) from http://www.melie.co.nz. What should firefox do with this file?
"

My index file is a php file , I guess that why it requires the php application. I am using suPhP and suExec and it is being selected using the cpanel. May be I have to change the owner of cgi-bin and *.php files.

I do appreciate your suggestions.

skipper123 06-20-2012 10:30 AM

I would recommend you to check the following URL for troubleshooting the error:
http://www.linuxquestions.org/questi...pd-php-524356/


All times are GMT -5. The time now is 07:38 AM.