Script to search corrupted php files
find -name ‘*.php’ -exec grep -rIL . {} \;
Tips, tricks, how-to, tutorials – all about Information Technology – Since 2004
find -name ‘*.php’ -exec grep -rIL . {} \;
Using openssl and base64 openssl rand -base64 25 The above command will generate a random string with the length of 25 characters. 2.
The script will search the current directory for all htaccess files and will combine in a single text file. find . -name ‘.htaccess’ -exec echo “### START Imported from”.{}.”###” \; -exec cat {} \; -exec echo “#### END Imported from “.{}.”###” \; -exec echo”” \; >> all-htaccess.txt
Messages that are rejected without being quarantined Some messages are rejected immediately without being quarantined. This happens at SMTP level and the rejection is permanent. For example this will happen for Incoming messages in the following scenarios: Have an invalid recipient or domain Do not use TLS (if enforced on the incoming domain) Do not … Read more
for Let’s Encrypt RewriteEngine On RewriteCond %{REQUEST_URI} !\.well-known/acme-challenge RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] for cPanel AutoSSL RewriteEngine On RewriteCond %{REQUEST_URI} !\.well-known/pki-validation RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
How to use PeachFlame script to fix cPanel account permissions: To get the fixperms script, simply wget the file from GitHub and make sure it’s executable: wget https://raw.githubusercontent.com/PeachFlame/cPanel-fixperms/master/fixperms.sh chmod +x fixperms.sh Fixperms – for all of the users If you would like fix the permissions for every user on your cPanel server, simply use the … Read more
Systemd logs that are stored in /var/log/journal can be cleared by using journalctl command. Here are some useful commands To find out the size of the log folder: du -sh /var/log/journal/ Clear systemd journals older than n days: journalctl –vacuum-time=30d Clear systemd journals if they exceed n storage space: journalctl –vacuum-size=1G
Download RemoteBox wget http://remotebox.knobgoblin.org.uk/downloads/RemoteBox-2.6.tar.bz2 Ensure the required dependencies are installed as follows: apt-get install libgtk2-perl libsoap-lite-perl freerdp-x11 tigervnc-viewer To launch RemoteBox, unpack the previously downloaded RemoteBox tarball and run the ‘remotebox’ executable. vboxweb-service need to be installed and active on the target server. The following article describe how to install a Headless Server on CentOS … Read more
Login via SSH to the server $ sudo -u www-data php /var/www/nextcloud/occ user:resetpassword admin Enter a new password: Confirm the new password: Successfully reset password for admin
Environnement: Host OS: Windows 10 x64 VirtualBox Graphical User Interface Version 5.1.26 r117224 (Qt5.6.2) Guest OS: Lubuntu 17.04 VBOXADDITIONS_5.1.26_117224 Problem: I manually installed VirtualBox Guest Additions from VBOXADDITIONS_5.1.26_117224 ISO and restarted the guest. The bidirectional clipboard and the drag and drop still not working. Solution: Installation of Guest Additions from Ubuntu repository. Command: sudo apt-get install virtualbox-guest-dkms … Read more
The problem: All websites are down with Internal Server Error 500 Symptoms: Cpanel wasn’t loading with the following error: Internal Server Error 500 Can’t fork: Cannot allocate memory at /usr/local/cpanel/Cpanel/SafeRun/InOut.pm line 40. cpsrvd/11.62.0.15 Server at hostname.example.com How I fixed it? First of all I was trying to increase this limit by searching for “Max cPanel … Read more
yum -y install acpid systemctl start acpid systemctl enable acpid