I can not run the phpinfo.php uploaded by FTP
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
I can not run the phpinfo.php uploaded by FTP
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:
Thank you.
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:
How to fix this?Forbidden
You don't have permission to access /phpinfo.php on this server.
Thank you.
Re: I can not run the phpinfo.php uploaded by FTP
What permisions have your files ?
You need do a chmod 644 phpinfo.php
You can change permisions whit your ftp client also.
You need do a chmod 644 phpinfo.php
You can change permisions whit your ftp client also.
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Re: I can not run the phpinfo.php uploaded by FTP
I tried 644, 755, 777, all can not work.
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: I can not run the phpinfo.php uploaded by FTP
Have you uploaded the file with the right account?
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Re: I can not run the phpinfo.php uploaded by FTP
Yes, there is only one user "admin", I just uploaded via this account on FTP.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: I can not run the phpinfo.php uploaded by FTP
Code: Select all
chown -R admin:admin /home/admin/web/<yourdomain>/public_html
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Re: I can not run the phpinfo.php uploaded by FTP
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"?
Are you sure I should change the owner to "admin"?
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: I can not run the phpinfo.php uploaded by FTP
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.
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: I can not run the phpinfo.php uploaded by FTP
baijianpeng wrote:Yes, there is only one user "admin", I just uploaded via this account on FTP.
You are contradicting yourself ...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"?
Execute this command and replace <username> with the owner of the domain.
chown -R <username>:<username> /home/<username>/web/<yourdomain>/public_html
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Re: I can not run the phpinfo.php uploaded by FTP
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.
In fact, the "php file can not be executed" problem exists on both of them.
I will try your method today.
Thank you.