Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

I can not run the phpinfo.php uploaded by FTP

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
12 posts
  • 1
  • 2
  • Next
baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

I can not run the phpinfo.php uploaded by FTP
  • Quote

Post by baijianpeng » Thu May 12, 2016 12:05 am

I installed VestaCP on CentOS 7 64-bit, then installed Multiple PHP Selector by skamasle.

Now I want to run a phpinfo.php file to see the PHP information of my server.

I uploaded the file phpinfo.php to my web root and tried to visit that file in my browser, I got following error message:
Forbidden

You don't have permission to access /phpinfo.php on this server.
How to fix this?

Thank you.
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: I can not run the phpinfo.php uploaded by FTP
  • Quote

Post by skamasle » Thu May 12, 2016 1:55 pm

What permisions have your files ?

You need do a chmod 644 phpinfo.php

You can change permisions whit your ftp client also.
Top

baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

Re: I can not run the phpinfo.php uploaded by FTP
  • Quote

Post by baijianpeng » Thu May 12, 2016 2:58 pm

I tried 644, 755, 777, all can not work.
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: I can not run the phpinfo.php uploaded by FTP
  • Quote

Post by tjebbeke » Sun May 15, 2016 9:59 am

Have you uploaded the file with the right account?
Top

baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

Re: I can not run the phpinfo.php uploaded by FTP
  • Quote

Post by baijianpeng » Sun May 15, 2016 11:03 am

Yes, there is only one user "admin", I just uploaded via this account on FTP.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: I can not run the phpinfo.php uploaded by FTP
  • Quote

Post by mehargags » Sun May 15, 2016 8:32 pm

Code: Select all

chown -R admin:admin /home/admin/web/<yourdomain>/public_html
replace <yourdomain> with name of domain that you made in your VestaCP under which your PHPinfo file is residing
Top

baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

Re: I can not run the phpinfo.php uploaded by FTP
  • Quote

Post by baijianpeng » Mon May 16, 2016 12:19 pm

Why assign the owner as "admin"? I created the website (domain) and FTP account under another user of VestaCP, not admin.

Are you sure I should change the owner to "admin"?
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: I can not run the phpinfo.php uploaded by FTP
  • Quote

Post by mehargags » Mon May 16, 2016 4:26 pm

yes you can either do admin:admin or user:admin both will work because the admin user has all rights for www and execution of scripts.
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: I can not run the phpinfo.php uploaded by FTP
  • Quote

Post by tjebbeke » Wed May 18, 2016 2:14 pm

baijianpeng wrote:Yes, there is only one user "admin", I just uploaded via this account on FTP.
baijianpeng wrote:Why assign the owner as "admin"? I created the website (domain) and FTP account under another user of VestaCP, not admin.

Are you sure I should change the owner to "admin"?
You are contradicting yourself ...

Execute this command and replace <username> with the owner of the domain.
chown -R <username>:<username> /home/<username>/web/<yourdomain>/public_html
Top

baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

Re: I can not run the phpinfo.php uploaded by FTP
  • Quote

Post by baijianpeng » Thu May 19, 2016 2:30 am

sorry, I have two VPS both have this problem. One is remote, one is local on Virutalbox. I had mixed them up.

In fact, the "php file can not be executed" problem exists on both of them.

I will try your method today.

Thank you.
Top


Post Reply
  • Print view

12 posts
  • 1
  • 2
  • Next

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password