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 General Discussion
  • Search

Security

General questions about VestaCP
Post Reply
  • Print view
Advanced search
18 posts
  • 1
  • 2
  • Next
petone
Posts: 3
Joined: Sat Aug 25, 2018 8:19 pm

Os: CentOS 6x
Web: apache + nginx
Security
  • Quote

Post by petone » Sun Aug 26, 2018 3:13 pm

Hello, how can I protect the server from the php shell?
The fact is that any user can install the script and view the file of another user.
Top

dreiggy
Posts: 154
Joined: Thu May 17, 2018 8:05 pm
Contact:
Contact dreiggy
Skype

Os: CentOS 6x
Web: apache + nginx
Re: Security
  • Quote

Post by dreiggy » Thu Aug 30, 2018 8:32 pm

I think open_basedir should help you to resolve this problem: http://php.net/manual/en/ini.core.php#ini.open-basedir
Top

grayfolk
Support team
Posts: 1111
Joined: Tue Jul 30, 2013 10:18 pm
Contact:
Contact grayfolk
Website Facebook Skype Twitter

Os: CentOS 6x
Web: nginx + php-fpm
Re: Security
  • Quote

Post by grayfolk » Thu Aug 30, 2018 9:16 pm

dreiggy wrote: ↑
Thu Aug 30, 2018 8:32 pm
I think open_basedir should help you to resolve this problem: http://php.net/manual/en/ini.core.php#ini.open-basedir
What about open_basedir in CLI?
Top

ScIT
Support team
Posts: 617
Joined: Mon Feb 23, 2015 4:13 pm

Os: Ubuntu 17x
Web: apache + nginx
Re: Security
  • Quote

Post by ScIT » Fri Aug 31, 2018 5:31 am

Think you should check the sftp chroot module from vesta: http://vestacp.com/features/
Top

xorro
Posts: 87
Joined: Sun Nov 13, 2016 3:11 pm
Contact:
Contact xorro
Website Skype

Os: CentOS 6x
Web: apache + nginx
Re: Security
  • Quote

Post by xorro » Fri Aug 31, 2018 7:06 am

First of all no matter you have extra security on server on not but when you are really worried about security then you must first go for vestacp chroot plugin and then go for malware solution.
Solution 1: https://github.com/rfxn/linux-malware-detect
Solution 2: https://revisium.com/aibo/

Install these on your server and add a cron job via vestacp so these tools keep scanning your server time to time. But if i talk about myself i do not rely on softwares i do check the code myself for the file changes and that is the only best solution to beat the hackers as some codes cannot be detected by anti-virus (clamv) or these type of malware detectors. reason is hackers use obfuscate the php shells to decrease the detection so it is better to have a look on server files.

If you are a hosting and you have too many sites and you cannot spend time to check each file then i use another solution.
That is actually a bit awkward but i still do this. which is i have install a windows virtual machine on my system and installed 3 major antivirus Bitdefender / Kaspersky / Eset NOD and 1 malware scanner (Malwarebytes). Download all server backup to that virtual machine and scan it with all these 4 tools. if they come up with clean results there is nothing to worry but if not then find out the file on server and do what ever you like.
Top

petone
Posts: 3
Joined: Sat Aug 25, 2018 8:19 pm

Os: CentOS 6x
Web: apache + nginx
Re: Security
  • Quote

Post by petone » Wed Sep 26, 2018 6:43 pm

ScIT wrote: ↑
Fri Aug 31, 2018 5:31 am
Think you should check the sftp chroot module from vesta: http://vestacp.com/features/
I use sftp chroot module. And all exactly from the account you can see any information on the other
Top

elpak
Posts: 10
Joined: Sun Oct 21, 2018 7:42 am
Contact:
Contact elpak
Website

Os: Ubuntu 15x
Web: apache + nginx
Re: Security
  • Quote

Post by elpak » Sun Oct 21, 2018 8:59 am

Security is always first and you need to pay attention.
Top

chrisf
Posts: 49
Joined: Sat Oct 13, 2018 6:25 pm

Os: Ubuntu 16x
Web: apache + nginx
Re: Security
  • Quote

Post by chrisf » Sun Oct 21, 2018 3:43 pm

Funny everyone here, in ignorance, says use sftp plugin.

That does nothing for php. It ONLY restricts ssh.

open_basedir is what others suggested, and it is one of the first steps. Next would be to disable dangerous php functions that nearly ALL shared hosting providers disable.

OS? Nginx + Apache? Things needed to know.

I switched to PHP-FPM using the guide on the forum. (It worked perfectly for ubuntu 18.04). It is much more secure as it runs as the user. (NEVER run sites under admin, create a user).

:-)
Top

chrisf
Posts: 49
Joined: Sat Oct 13, 2018 6:25 pm

Os: Ubuntu 16x
Web: apache + nginx
Re: Security
  • Quote

Post by chrisf » Sun Oct 21, 2018 5:08 pm

This is a MUST starting point for any shared hosting...

Code: Select all

disable_functions =	exec,shell_exec,passthru,system,proc_open,popen,show_source
I use that even for my personal sites, just in case joomla exploit happens, php shell kits fail.

This will hinder some plugins, but... remove the plugin. Never compromise security for an addition to a site, EVER.
Last edited by chrisf on Sun Oct 21, 2018 8:28 pm, edited 1 time in total.
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: Security
  • Quote

Post by imperio » Sun Oct 21, 2018 8:24 pm

You can disable some php functions, read the message from chrisf
Top


Post Reply
  • Print view

18 posts
  • 1
  • 2
  • Next

Return to “General Discussion”



  • 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