Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
2537
views
upgrade to php 8.* version on centos 7.9
I have a Centos 7.9 with PHP 7.4.33 pre installed. followed this command steps for upgrading the php version to 8.1: sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm sudo yum install -y yum-utils sudo yum-config-manager --enable remi-php81 sudo yum-config-manager --disable...
I have a Centos 7.9 with PHP 7.4.33 pre installed. followed this command steps for upgrading the php version to 8.1:
sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum install -y yum-utils
sudo yum-config-manager --enable remi-php81
sudo yum-config-manager --disable remi-php74
sudo yum install -y php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd
but at the end it returns:
No package php available.
No package php-common available.
No package php-opcache available.
No package php-mcrypt available.
No package php-cli available.
No package php-gd available.
No package php-curl available.
No package php-mysqlnd available.
Error: Nothing to do
retried with this:
yum --disablerepo="*" --enablerepo="remi-php81" list available
got same return. also tried:
sudo yum clean all
sudo yum update
and:
sudo yum install -y php81 php81-common php81-opcache php81-cli php81-gd php81-curl php81-mysqlnd
Same... .
what should i do?
---------
Update:
I have a Cpanel WHM on this server. in php version manager, i was able to change the version to 8. But what I want is 8.1 and it is not among the options.
Pooya Behravesh
(101 rep)
Apr 3, 2023, 02:54 PM
• Last activity: Aug 3, 2025, 04:08 AM
3
votes
1
answers
3190
views
Apache: how to run PHP files via CGI as normal user and without them being executable
# Background ## Config of server I want to mimic I have access to a CentOS 7 server with cPanel/WHM installed, running EasyApache4 with the following configuration: # /usr/local/cpanel/bin/rebuild_phpconf --current DEFAULT PHP: ea-php56 ea-php55 SAPI: cgi ea-php56 SAPI: cgi ea-php70 SAPI: cgi # rpm...
# Background
## Config of server I want to mimic
I have access to a CentOS 7 server with cPanel/WHM installed, running EasyApache4 with the following configuration:
# /usr/local/cpanel/bin/rebuild_phpconf --current
DEFAULT PHP: ea-php56
ea-php55 SAPI: cgi
ea-php56 SAPI: cgi
ea-php70 SAPI: cgi
# rpm -qa|grep ruid2
# rpm -qa|grep suexec
ea-apache24-mod_suexec-2.4.33-5.5.1.cpanel.x86_64
I believe
> exec whoami: myuser
> system whoami: myuser
> system id -a: uid=1002(myuser) gid=1003(myuser) groups=1003(myuser)
> getcurrentuser: myuser
## Behaviour I want to mimic This is true even if it lacks the executable permission, as follows: $ ls -l /home/myuser/public_html/public/whoami.php | cut -d' ' -f1,3,4,9 -r-------- myuser myuser /home/myuser/public_html/public/whoami.php Normally, Apache 2.4 in CGI mode cannot run a non-executable file like this, if I understand [the documentation](https://httpd.apache.org/docs/2.4/howto/cgi.html) correctly: > Of course, the file will have to exist, **and be executable**, and return output in a particular way, or Apache will return an error message. However, cPanel/WHM seems to do *something* to alter this fact. According to the [WHM documentation](https://documentation.cpanel.net/display/EA4/PHP+Handlers) : > ## CGI > The CGI handler executes PHP applications through the
suEXEC
is enabled, because /var/log/apache2/error_log
contains entries like AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
.
I believe neither mod_ruid2
, nor suPHP
, nor PHP-FPM
, nor FastCGI
, nor DSO
(aka mod_php
) are enabled.
This server has a user, **myuser**, whose ~/public_html/public/
directory is used as the document root for the website **mywebsite.com**. (These are not the real names, obviously.)
If I put, in that directory, a PHP file called whoami.php
with the following contents (note the lack of a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix))) :
sapi_name:
exec whoami:
system whoami:
system id -a:
getcurrentuser:
and visit it in the browser athttp://mywebsite.com/whoami.php
(note that this is *not* using the http://mywebsite.com/~myuser/whoami.php
UserDir URL format), it renders as:
> sapi_name: cgi-fcgi> exec whoami: myuser
> system whoami: myuser
> system id -a: uid=1002(myuser) gid=1003(myuser) groups=1003(myuser)
> getcurrentuser: myuser
## Behaviour I want to mimic This is true even if it lacks the executable permission, as follows: $ ls -l /home/myuser/public_html/public/whoami.php | cut -d' ' -f1,3,4,9 -r-------- myuser myuser /home/myuser/public_html/public/whoami.php Normally, Apache 2.4 in CGI mode cannot run a non-executable file like this, if I understand [the documentation](https://httpd.apache.org/docs/2.4/howto/cgi.html) correctly: > Of course, the file will have to exist, **and be executable**, and return output in a particular way, or Apache will return an error message. However, cPanel/WHM seems to do *something* to alter this fact. According to the [WHM documentation](https://documentation.cpanel.net/display/EA4/PHP+Handlers) : > ## CGI > The CGI handler executes PHP applications through the
mod_cgi
or
> the mod_cgid
Apache modules. If you install the suEXEC module, the
> system executes PHP applications as the user that owns the VirtualHost
> that served the request. If you uninstall the suEXEC module, the
> system executes PHP applications as the nobody
system user. The system
> provides mod_cgi
and mod_ruid2
by default.
>
> You can customize the CGI handler's settings in the PHP .user.ini
> file. [...]
>
>> ###Important:
>>
>> If you **enable** a per-user module, such as suEXEC or Ruid2, you can
>> execute PHP scripts with permissions of 0400
. If you disable a
>> per-user module, such as suEXEC or Ruid2, you can execute PHP scripts
>> with permissions of 0444
.
I.e. even without suEXEC or Ruid2 enabled, EasyApache4 is somehow able to make Apache process non-executable PHP files as CGI scripts rather than just serving them as static files.
# Questions
I have a different CentOS 7 machine, not routable from the internet, and for development only. It does *not* have cPanel/WHM installed. Security is **not** a priority for this machine, and it has SELinux disabled. Mimicking cPanel/WHM's behaviour **is** a priority for this machine: top priority.
1. On this machine, how would I persuade Apache 2.4 to run PHP files whose permissions are 0400
or 0444
, and that lack a shebang, as CGI scripts via PHP 5.6, rather than just serving them as static files? I.e. how would I achieve the *something* alluded to above? I'm happy to compile Apache with non-standard [suEXEC configuration options](https://httpd.apache.org/docs/trunk/suexec.html#install) , if needed.
1. In particular, how can I do this while serving them *without* needing use a UserDir URL (i.e. without the /~myuser
part of a URL such as http://mywebsite.com/~myuser/mypage.php
)?
1. How would I do all this while *also* ensuring that those files are run by **myuser**, via suEXEC, rather than by the **apache** or **httpd** or **nobody** user?
If you can answer all three questions at a stroke, so much the better, but even if you can answer just the first one, that would be very helpful! Thank you :)
user6860
Apr 28, 2018, 06:40 PM
• Last activity: May 25, 2025, 09:02 AM
0
votes
1
answers
20
views
I can't log in into cPanel on rocky 9 after fresh instalation
I have installed `rocky 9 with cis 1` (security). As required I `disabled root user`, and created other user with root priviliges. Then I have installed `cPanel`, but I'm `unable to log in on WHM` (on other linux I logged on root user - no problem). You cant log in into cPanel with disabled root use...
I have installed
rocky 9 with cis 1
(security).
As required I disabled root user
, and created other user with root priviliges.
Then I have installed cPanel
, but I'm unable to log in on WHM
(on other linux I logged on root user - no problem).
You cant log in into cPanel with disabled root user??
Is there a workaround?
baron_bartek
(113 rep)
Apr 2, 2025, 08:10 AM
• Last activity: Apr 2, 2025, 09:38 AM
-1
votes
1
answers
52
views
How do I install python on cpanel on linux
I am trying to deploy a linux executable from Delphi. 1. The host has cpanel 2. I have installed PAServer 3. However I get this error about symlink target directory does not exist [![enter image description here][1]][1] ``` Unable to start LLDB kernel: ;Symbolic link target does not exist: /home/pac...
I am trying to deploy a linux executable from Delphi.
1. The host has cpanel
2. I have installed PAServer
3. However I get this error about symlink target directory does not exist

Unable to start LLDB kernel: ;Symbolic link target does not exist: /home/pacifi85/PAServer-23.0/lldb/lib/libpython3.so -> /usr/lib/x86_64-linux-gnu/libputhon3/7m.so.1.0.
Please make sure that the target exists or update the link to point to the new Python 3 shared object.
---
Looking around the server, x86_64-linux-gnu
directory does not exist. So, I am guessing that perhaps python is not installed.
I see these files in **usr/lib**
python3.6
site-packages
easy_install.py
pip
pip-9.0.3.dist-info
pkg_resources
__pycache__
setuptools
setuptools-39.2.0.dist-info
setuptools has a many .py files.
I have searched but I haven't found anything that corresponds to the files I see.
How can I install python on it.
Notes
- cpanel has no menu item to do it.
- On other forums I am told to point the symlink to whatever version **.so** there is.
- But I cant find the **so** or any path to **x86**. I am coming to the conclusion that either my tool no longer works on ARM or my host no longer uses x86.
---
Just finished an hour long session with ISP-support. They insist that python is installed but cant tell me where the library /shared-object is located.
Rohit Gupta
(385 rep)
Jan 14, 2025, 03:25 PM
• Last activity: Jan 14, 2025, 04:36 PM
3
votes
1
answers
2103
views
Server is failing SSH connections
Not certain what's happened here, but any SSH connection to my server is failing. Yesterday it was working, today it is not. - **Server**: Centos 6.10 cPanel v86.0.18 - **Client**: Windows systems using Putty SSH I am on a Windows machine using Putty. I can connect to the IP on port 22. If I type th...
Not certain what's happened here, but any SSH connection to my server is failing. Yesterday it was working, today it is not.
- **Server**: Centos 6.10 cPanel v86.0.18
- **Client**: Windows systems using Putty SSH
I am on a Windows machine using Putty. I can connect to the IP on port 22. If I type the wrong password, it gives me the password prompt again. If I provide the correct password it either just closes the session window or gives me an error
Server unexpectedly closed network connection
. On my local firewall, the logs are showing the session ended due to a tcp-fin
packet - meaning the remote server closed the session.
From within cPanel I use the Terminal
app to emulate a console session and I am able to get root command line: [root@sX-X-X-X ~]#
. From there I then ssh to itself: ssh username@x.x.x.x
- and I get this error: dup() in/out/err failed
I restarted the sshd and the problem persists. What can I do or look at to get this resolved?
### Update 1
Ran this debug command from prompt:
[root@X.X.X.X ~]# ssh -vvvo PreferredAuthentications=password userID@X.X.X.X
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to X.X.X.X [X.X.X.X] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/identity-cert type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug3: Wrote 864 bytes for a total of 885
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96
debug2: kex_parse_kexinit: hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-sha1
debug1: kex: server->client aes128-ctr hmac-sha1 none
debug2: mac_setup: found hmac-sha1
debug1: kex: client->server aes128-ctr hmac-sha1 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<2048<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug3: Wrote 24 bytes for a total of 909
debug2: dh_gen_key: priv key bits set: 161/320
debug2: bits set: 1000/2048
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: Wrote 272 bytes for a total of 1181
debug3: check_host_in_hostfile: host 166.62.85.95 filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: host 166.62.85.95 filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 1
debug1: Host 'X.X.X.X' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug2: bits set: 1030/2048
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: Wrote 16 bytes for a total of 1197
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug3: Wrote 52 bytes for a total of 1249
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /root/.ssh/identity ((nil))
debug2: key: /root/.ssh/id_rsa ((nil))
debug2: key: /root/.ssh/id_dsa ((nil))
debug2: key: /root/.ssh/id_ecdsa ((nil))
debug3: Wrote 84 bytes for a total of 1333
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password
debug3: preferred password
debug3: authmethod_lookup password
debug3: remaining preferred:
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
userID@X.X.X.X's password:
debug3: packet_send2: adding 48 (len 72 padlen 8 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug3: Wrote 148 bytes for a total of 1481
Segmentation fault
### Update 2
I have tried ssh via several different user accounts, even root
-- I get the same results for all users. Here is the user output info:
$ grep userID /etc/passwd
$ userID:x:501:501::/home/userID:/bin/bash
$ ls -1 /proc/1121/fd | wc -l
4
$ cat /proc/sys/fs/file-max
262144
$ cat /proc/sys/fs/file-nr
139584 0 262144
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/ploop34902p1 118G 14G 100G 12% /
none 2.0G 4.0K 2.0G 1% /dev
none 2.0G 0 2.0G 0% /dev/shm
Also reboot did nothing, still unable to ssh.
### Update 3
From my SSH logs, its accepting the password and then immediately closing the session:
Apr 21 11:44:09 sX.X.X.X sshd: Accepted password for myAdminID from 47.200.121.187 port 4283 ssh2
Apr 21 11:44:09 sX.X.X.X sshd: pam_unix(sshd:session): session opened for user myAdminID by (uid=0)
Apr 21 11:44:10 sX.X.X.X sshd: pam_unix(sshd:session): session closed for user myAdminID
rolinger
(175 rep)
Apr 24, 2020, 11:05 PM
• Last activity: Aug 7, 2024, 06:44 AM
0
votes
1
answers
404
views
Node JS Installation on CentOS using Root Login
I have installed node js( using sudo yum install nodejs) on centos 7 using root which seems find as root user but not accessible for other users. When I check as root user I am able to see version root@server.com [~]# node -v v16.14.2 [![root shell screenshot][1]][1] But for non root user its nonroo...
I have installed node js( using sudo yum install nodejs) on centos 7 using root which seems find as root user but not accessible for other users.
When I check as root user I am able to see version
root@server.com [~]# node -v
v16.14.2
But for non root user its
nonrootuser@server.com [~]# node -v
node: error while loading shared libraries: libbrotlidec.so.1: cannot open shared object file: No such file or directory


Harish Kumar
(1 rep)
May 12, 2023, 01:39 AM
• Last activity: May 12, 2024, 10:10 AM
1
votes
1
answers
3650
views
How to change FTP home directory in Centos 6
I have created one Linux CentOS 6 instance in Amazon EC2 and installed cPanel on it and started running my websites there. The issue I face was when I try to FTP to the instance with the following config IP : Instance IP Username : centos Password : Blank Mode : SFTP SFTP Key : Private KEY (PEM) Pro...
I have created one Linux CentOS 6 instance in Amazon EC2 and installed cPanel on it and started running my websites there. The issue I face was when I try to FTP to the instance with the following config
IP : Instance IP
Username : centos
Password : Blank
Mode : SFTP
SFTP Key : Private KEY (PEM) Provided by Amazon EC2 dashboard
I got to view only
> /home/centos
directory
But I want to view the main directory which is back to home directory
When I tried to click
> ..
in FileZilla it says
> "Permission Denied"
So I tried the following
> vipw /etc/passwd
and changed
> centos:x:1000:1000:Cloud User:/home/centos:/bin/bash
to
> centos:x:1000:1000:Cloud User:/ :/bin/bash
and even to
> centos:x:1000:1000:Cloud User: :/bin/bash
However , after this change FTP stopped logging in
Finally, I reverted back to
> centos:x:1000:1000:Cloud User:/home/centos:/bin/bash
Kindly guide me to achieve this.
Raja Gopal
(111 rep)
Jul 23, 2015, 05:39 AM
• Last activity: Apr 11, 2024, 12:05 PM
0
votes
1
answers
173
views
Is there a way to access files and information on an offline Linux server
We have a Linux server that was set up with CentOS and cPanel/WHM. It was taken out of service a few years ago but has some files and site information on it that were lost from our current server, and we would like to try and retrieve them from the old one. The machine is a Dell R530 that is just si...
We have a Linux server that was set up with CentOS and cPanel/WHM. It was taken out of service a few years ago but has some files and site information on it that were lost from our current server, and we would like to try and retrieve them from the old one. The machine is a Dell R530 that is just sitting in a closet right now with a display and keyboard connected. Assuming it will boot without an issue, here are my questions:
1) Without killing the machine, is there a way to go about finding and copying the files to an external USB drive, either directly or through another machine, using command line? I know the file hierarchy well enough to locate what we need if I can get in.
2) Can the machine be connected to a router so that I can access WHM using a browser on another machine on the local network?
Our office machines are all Mac OS, but I can bring in Windows or Linux machines if it makes for a better solution.
Apologies if this sounds like a hare-brained scheme. As should be apparent, I'm definitely not a server technician.
Johnathan Crowe
(1 rep)
Jan 5, 2024, 08:20 AM
• Last activity: Jan 6, 2024, 01:27 PM
0
votes
0
answers
67
views
How do I create a windows server vm on existing linux server running cPanel?
I have a web server running Almalinux and cPanel (LAMP Stack). We need to run a new web app created with ASP.net and SQL Server on the same server and according to our research, there is no way to do that from inside cPanel or WHM. So, we have been considering creating a Windows Server VM for that p...
I have a web server running Almalinux and cPanel (LAMP Stack).
We need to run a new web app created with ASP.net and SQL Server on the same server and according to our research, there is no way to do that from inside cPanel or WHM.
So, we have been considering creating a Windows Server VM for that purpose.
Based on the above, I have 2 questions:
1. Is it possible to achieve this setup using standard vmware software, or does it require any special tools or considerations?
2. Will this be optimal for the situation described, or am I missing something or better options?
Ameer Elsherif
(1 rep)
Sep 17, 2023, 11:11 AM
• Last activity: Sep 17, 2023, 04:35 PM
0
votes
2
answers
1315
views
Cron Error: No such file or directory
Looking for some guidance around setting up a cron job to run every 15 minutes that sets off a script within the WordPress Plugin Amelia. According to their docs, I need to add the following line to the Cron file: `*/15 * * * * https://domain.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/not...
Looking for some guidance around setting up a cron job to run every 15 minutes that sets off a script within the WordPress Plugin Amelia. According to their docs, I need to add the following line to the Cron file:
I've added quotes to the command as I was getting errors because it was splitting the command when reaching an
*/15 * * * * https://domain.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send
Now as I'm using CPanel I set up the cronjob using the gui so it looks something like this. Swapping https://domain.com
for the actual domain.:

&
but I am still getting an error saying the directory is not found.
Any help would be great. Thank you in advance.
Daniel Sissons
(101 rep)
Jun 7, 2020, 10:20 AM
• Last activity: Jul 3, 2023, 10:30 AM
1
votes
1
answers
473
views
Unable to make outbound connections on port 443
I have an old server on CentOS 5, with cPanel installed, hosted on Amazon AWS EC2: ``` uname -a Linux 2.6.32-573.22.1.el6.x86_64 #1 SMP Wed Mar 23 03:35:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux ``` It wasn't touched for a very long time. Today, suddenly, it's not able to make outgoing connections...
I have an old server on CentOS 5, with cPanel installed, hosted on Amazon AWS EC2:
uname -a
Linux 2.6.32-573.22.1.el6.x86_64 #1 SMP Wed Mar 23 03:35:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
It wasn't touched for a very long time. Today, suddenly, it's not able to make outgoing connections on port 443:
curl -v https://google.com
* About to connect() to google.com port 443 (#0)
* Trying 142.250.217.78... Connection timed out
* Trying 2607:f8b0:400a:80b::200e... Failed to connect to 2607:f8b0:400a:80b::200e: Network is unreachable
* Success
* couldn't connect to host
* Closing connection #0
curl: (7) Failed to connect to 2607:f8b0:400a:80b::200e: Network is unreachable
while the connections to port 80 go through:
curl -v http://google.com ⏎
* About to connect() to google.com port 80 (#0)
* Trying 142.251.211.238... connected
* Connected to google.com (142.251.211.238) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.44 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: google.com
> Accept: */*
>
301 Moved
301 Moved
The document has moved
here.
* Connection #0 to host google.com left intact
* Closing connection #0
I've cleaned iptables to ensure that's they're not a problem:
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
The only relevant note in /var/log/messages
I can find, during the moment when problems started to occur, logs when datadog agent starts to fail at 11:25:
ov 25 11:04:50 xxx dd.dogstatsd: INFO (dogstatsd.py:276): Flush #944863: flushed 25 metrics, 0 events, and 0 service check runs
Nov 25 11:05:00 xxx dd.dogstatsd: INFO (dogstatsd.py:276): Flush #944864: flushed 25 metrics, 0 events, and 0 service check runs
Nov 25 11:05:05 xxx dd.forwarder: INFO (transaction.py:190): No transaction to flush during flush #3145520
Nov 25 11:05:10 xxx dd.dogstatsd: INFO (dogstatsd.py:276): Flush #944865: flushed 25 metrics, 0 events, and 0 service check runs
Nov 25 11:06:00 xxx dd.forwarder: INFO (transaction.py:190): No transaction to flush during flush #3145540
Nov 25 11:07:00 xxx dd.forwarder: INFO (transaction.py:177): Flushing 1 transaction during flush #3145560
Nov 25 11:07:29 xxx dd.collector: INFO (collector.py:571): Finished run #491350. Collection time: 4.23s. Emit time: 0.02s
Nov 25 11:08:05 xxx dd.forwarder: INFO (transaction.py:190): No transaction to flush during flush #3145580
Nov 25 11:09:03 xxx pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
Nov 25 11:09:03 xxx pure-ftpd: (?@127.0.0.1) [INFO] __cpanel__service__auth__ftpd__xxx is now logged in
Nov 25 11:09:03 xxx pure-ftpd: (__cpanel__service__auth__ftpd__xxx@127.0.0.1) [INFO] Logout.
Nov 25 11:09:10 xxx dd.forwarder: INFO (transaction.py:177): Flushing 1 transaction during flush #3145600
Nov 25 11:10:05 xxx dd.forwarder: INFO (transaction.py:177): Flushing 2 transactions during flush #3145620
Nov 25 11:10:43 xxx dd.collector: INFO (collector.py:571): Finished run #491360. Collection time: 4.12s. Emit time: 0.02s
Nov 25 11:11:02 xxx dd.forwarder: INFO (transaction.py:177): Flushing 1 transaction during flush #3145640
Nov 25 11:12:05 xxx dd.forwarder: INFO (transaction.py:177): Flushing 3 transactions during flush #3145660
Nov 25 11:13:20 xxx dd.forwarder: INFO (transaction.py:177): Flushing 3 transactions during flush #3145680
Nov 25 11:13:55 xxx dd.collector: INFO (collector.py:571): Finished run #491370. Collection time: 4.23s. Emit time: 0.02s
Nov 25 11:14:07 xxx pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
Nov 25 11:14:07 xxx pure-ftpd: (?@127.0.0.1) [INFO] __cpanel__service__auth__ftpd__xxx is now logged in
Nov 25 11:14:07 xxx pure-ftpd: (__cpanel__service__auth__ftpd__xxx@127.0.0.1) [INFO] Logout.
Nov 25 11:14:45 xxx dd.forwarder: INFO (transaction.py:190): No transaction to flush during flush #3145700
Nov 25 11:16:00 xxx dd.dogstatsd: INFO (dogstatsd.py:276): Flush #944930: flushed 25 metrics, 0 events, and 0 service check runs
Nov 25 11:16:09 xxx dd.forwarder: INFO (transaction.py:177): Flushing 1 transaction during flush #3145720
Nov 25 11:16:10 xxx dd.dogstatsd: INFO (dogstatsd.py:276): Flush #944931: flushed 25 metrics, 0 events, and 0 service check runs
Nov 25 11:16:20 xxx dd.dogstatsd: INFO (dogstatsd.py:276): Flush #944932: flushed 26 metrics, 0 events, and 0 service check runs
Nov 25 11:16:30 xxx dd.dogstatsd: INFO (dogstatsd.py:276): Flush #944933: flushed 25 metrics, 0 events, and 0 service check runs
Nov 25 11:16:40 xxx dd.dogstatsd: INFO (dogstatsd.py:276): Flush #944934: flushed 25 metrics, 0 events, and 0 service check runs
Nov 25 11:16:50 xxx dd.dogstatsd: INFO (dogstatsd.py:276): Flush #944935: flushed 25 metrics, 0 events, and 0 service check runs
Nov 25 11:17:07 xxx dd.collector: INFO (collector.py:571): Finished run #491380. Collection time: 4.12s. Emit time: 0.02s
Nov 25 11:17:26 xxx dd.forwarder: INFO (transaction.py:177): Flushing 1 transaction during flush #3145740
Nov 25 11:18:30 xxx dd.forwarder: INFO (transaction.py:177): Flushing 1 transaction during flush #3145760
Nov 25 11:18:32 xxx dhclient: DHCPREQUEST on eth0 to 10.0.0.1 port 67 (xid=0x24b5d86f)
Nov 25 11:18:32 xxx dhclient: DHCPACK from 10.0.0.1 (xid=0x24b5d86f)
Nov 25 11:18:34 xxx dhclient: bound to 10.0.0.247 -- renewal in 1642 seconds.
Nov 25 11:19:30 xxx dd.forwarder: INFO (transaction.py:190): No transaction to flush during flush #3145780
Nov 25 11:20:08 xxx pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
Nov 25 11:20:08 xxx pure-ftpd: (?@127.0.0.1) [INFO] __cpanel__service__auth__ftpd__xxx is now logged in
Nov 25 11:20:08 xxx pure-ftpd: (__cpanel__service__auth__ftpd__xxx@127.0.0.1) [INFO] Logout.
Nov 25 11:20:19 xxx dd.collector: INFO (collector.py:571): Finished run #491390. Collection time: 4.22s. Emit time: 0.02s
Nov 25 11:20:30 xxx dd.forwarder: INFO (transaction.py:177): Flushing 1 transaction during flush #3145800
Nov 25 11:21:36 xxx dd.forwarder: INFO (transaction.py:177): Flushing 1 transaction during flush #3145820
Nov 25 11:22:26 xxx auditd: Audit daemon rotating log files
Nov 25 11:22:35 xxx dd.forwarder: INFO (transaction.py:177): Flushing 2 transactions during flush #3145840
Nov 25 11:23:31 xxx dd.forwarder: INFO (transaction.py:177): Flushing 1 transaction during flush #3145860
Nov 25 11:23:31 xxx dd.collector: INFO (collector.py:571): Finished run #491400. Collection time: 4.13s. Emit time: 0.02s
Nov 25 11:24:40 xxx dd.forwarder: INFO (transaction.py:190): No transaction to flush during flush #3145880
Nov 25 11:25:07 xxx pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
Nov 25 11:25:07 xxx pure-ftpd: (?@127.0.0.1) [INFO] __cpanel__service__auth__ftpd__xxx is now logged in
Nov 25 11:25:07 xxx pure-ftpd: (__cpanel__service__auth__ftpd__xxx@127.0.0.1) [INFO] Logout.
Nov 25 11:25:47 xxx dd.forwarder: ERROR (ddagent.py:282): Response: HTTPResponse(_body=None,buffer=None,code=599,effective_url='https://5-32-8-app.agent.datadoghq.com/intake/?api_key=*************************55166 ',error=HTTPError('HTTP 599: Timeout',),headers={},reason='Unknown',request=,request_time=20.000658988952637,time_info={})
Nov 25 11:25:47 xxx dd.forwarder: WARNING (transaction.py:268): Transaction 2419202 in error (1 error), it will be replayed after 2022-11-25 11:26:07
Nov 25 11:26:10 xxx dd.forwarder: ERROR (ddagent.py:282): Response: HTTPResponse(_body=None,buffer=None,code=599,effective_url='https://5-32-8-app.agent.datadoghq.com/api/v1/check_run/?api_key=*************************55166 ',error=HTTPError('HTTP 599: Timeout',),headers={},reason='Unknown',request=,request_time=20.00121808052063,time_info={})
Nov 25 11:26:10 xxx dd.forwarder: WARNING (transaction.py:268): Transaction 2419209 in error (1 error), it will be replayed after 2022-11-25 11:26:30
Nov 25 11:26:10 xxx dd.forwarder: WARNING (transaction.py:212): Flush 3145896 is taking more than 10s, stopping it
Nov 25 11:26:31 xxx dd.forwarder: ERROR (ddagent.py:282): Response: HTTPResponse(_body=None,buffer=None,code=599,effective_url='https://5-32-8-app.agent.datadoghq.com/api/v1/series/?api_key=*************************55166 ',error=HTTPError('HTTP 599: Timeout',),headers={},reason='Unknown',request=,request_time=20.00036597251892,time_info={})
Nov 25 11:26:31 xxx dd.forwarder: WARNING (transaction.py:268): Transaction 2419215 in error (1 error), it will be replayed after 2022-11-25 11:26:51
Nov 25 11:26:31 xxx dd.forwarder: WARNING (transaction.py:212): Flush 3145897 is taking more than 10s, stopping it
Nov 25 11:26:43 xxx dd.collector: INFO (collector.py:571): Finished run #491410. Collection time: 4.24s. Emit time: 0.02s
Nov 25 11:26:51 xxx dd.forwarder: ERROR (ddagent.py:282): Response: HTTPResponse(_body=None,buffer=None,code=599,effective_url='https://5-32-8-app.agent.datadoghq.com/api/v1/series/?api_key=*************************55166 ',error=HTTPError('HTTP 599: Timeout',),headers={},reason='Unknown',request=,request_time=20.00032901763916,time_info={})
No AWS configuration regarding security and networking has been changed. It seems that all HTTPS connections time out, hanging in SYN_SENT state..
Any ideas are very much appreciated.
Regards
synweap15
(121 rep)
Nov 25, 2022, 09:35 PM
• Last activity: Apr 28, 2023, 03:48 PM
0
votes
1
answers
8195
views
Centos "cannot create temp file for here-document: Read-only file system"
I am getting this error what ever I want to do on my server ``` cannot create temp file for here-document: Read-only file system ``` cpanel, whm and all websites are Down All my system files are read-only. I search for anything that might help but it is not working :( I have 200G of free disk space....
I am getting this error what ever I want to do on my server
cannot create temp file for here-document: Read-only file system
cpanel, whm and all websites are Down
All my system files are read-only. I search for anything that might help
but it is not working :(
I have 200G of free disk space.
My OS is Centos with WHM (Cpanel)
It is on the Hetzner data center
Rescue did not help
I cannot edit /etc/fstab because it is read-only.
vim /etc/fstab
my disks are
[root@server ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 32G 0 32G 0% /dev
tmpfs 32G 25M 32G 1% /run
tmpfs 32G 0 32G 0% /sys/fs/cgroup
/dev/md2 874G 545G 285G 66% /
tmpfs 6.3G 0 6.3G 0% /run/user/0
I tried to remount, but it does not work either.
mount -o remount,rw /
output of 'dmesg | tail'
[ 3.576436] IPv6: ADDRCONF(NETDEV_UP): enp0s31f6: link is not ready
[ 6.969821] e1000e: enp0s31f6 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[ 6.970035] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s31f6: link becomes ready
[ 10.124036] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 10.140747] nf_conntrack version 0.5.0 (65536 buckets, 262144 max)
[ 42.683041] systemd-readahead: Failed to open pack file: Read-only file system
[ 60.065749] ip_set: protocol 7
[ 302.063222] EXT4-fs (md2): error count since last fsck: 354
[ 302.063288] EXT4-fs (md2): initial error at time 1622194023: ext4_xattr_block_get:321: inode 37361099
[ 302.063461] EXT4-fs (md2): last error at time 1660967530: ext4_xattr_block_get:321: inode 37358850
output of 'journalctl -xe'
[root@server ~]# journalctl -xe
Jan 20 19:31:31 server.mm.com rsyslogd: action 'action 1' suspended, next retry is Fri Jan 20 19:32:01 2023 [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2007 ]
Jan 20 19:31:31 server.mm.com rsyslogd: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:31:31 server.mm.com PAM-hulk: failed to connect stream socket
Jan 20 19:31:31 server.mm.com sshd: pam_unix(sshd:auth): check pass; user unknown
Jan 20 19:31:31 server.mm.com sshd: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=46.101.248.68
Jan 20 19:31:31 server.mm.com rsyslogd: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:31:31 server.mm.com rsyslogd: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:31:32 server.mm.com sshd: Failed password for invalid user amssys from 46.101.248.68 port 38188 ssh2
Jan 20 19:31:32 server.mm.com sshd: Received disconnect from 46.101.248.68 port 38188:11: Bye Bye [preauth]
Jan 20 19:31:32 server.mm.com sshd: Disconnected from 46.101.248.68 port 38188 [preauth]
Jan 20 19:31:33 server.mm.com PAM-hulk: failed to connect stream socket
Jan 20 19:31:33 server.mm.com sshd: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=61.177.173.39 user=root
Jan 20 19:31:33 server.mm.com sshd: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Jan 20 19:31:33 server.mm.com rsyslogd: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:31:34 server.mm.com sshd: Invalid user netadmin from 43.134.40.99 port 42568
Jan 20 19:31:34 server.mm.com sshd: input_userauth_request: invalid user netadmin [preauth]
Jan 20 19:31:34 server.mm.com PAM-hulk: failed to connect stream socket
Jan 20 19:31:34 server.mm.com sshd: pam_unix(sshd:auth): check pass; user unknown
Jan 20 19:31:34 server.mm.com sshd: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=43.134.40.99
Jan 20 19:31:35 server.mm.com sshd: Failed password for root from 61.177.173.39 port 58331 ssh2
Jan 20 19:31:36 server.mm.com PAM-hulk: failed to connect stream socket
Jan 20 19:31:36 server.mm.com sshd: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Jan 20 19:31:37 server.mm.com sshd: Failed password for invalid user netadmin from 43.134.40.99 port 42568 ssh2
Jan 20 19:31:37 server.mm.com rsyslogd: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:31:37 server.mm.com sshd: Received disconnect from 43.134.40.99 port 42568:11: Bye Bye [preauth]
Jan 20 19:31:37 server.mm.com sshd: Disconnected from 43.134.40.99 port 42568 [preauth]
Jan 20 19:31:38 server.mm.com sshd: Failed password for root from 61.177.173.39 port 58331 ssh2
Jan 20 19:31:38 server.mm.com PAM-hulk: failed to connect stream socket
Jan 20 19:31:38 server.mm.com sshd: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Jan 20 19:34:36 server.mm.com rsyslogd: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com systemd: Started clamd antivirus daemon.
-- Subject: Unit clamd.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit clamd.service has finished starting up.
--
-- The start-up result is done.
Jan 20 19:34:36 server.mm.com rsyslogd: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd: action 'action 0' suspended, next retry is Fri Jan 20 19:35:06 2023 [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2007 ]
Jan 20 19:34:36 server.mm.com rsyslogd: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:34:36 server.mm.com rsyslogd: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:34:36 server.mm.com rsyslogd: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
**Solved:**
I contacted Hetzner support, and they fixed it for me
appreciate!
Please use the following wiki guide to run the file system check:
-----------------%<-----------------
https://docs.hetzner.com/robot/dedicated-server/troubleshooting/filesystem-check/
alirezaashrafi
(3 rep)
Jan 20, 2023, 07:12 PM
• Last activity: Jan 20, 2023, 08:19 PM
4
votes
4
answers
12469
views
Is it a correct way to clear the exim mail queue?
I use the following command to delete the exim mail queues exiqgrep -i | xargs exim -Mrm or # following commands seems to work faster compared to the above. exim -bpru | awk {'print $3'} | xargs exim -Mrm But the above commands do not work when the mail queue size is more than 100,000. It get stuck....
I use the following command to delete the exim mail queues
exiqgrep -i | xargs exim -Mrm
or
# following commands seems to work faster compared to the above.
exim -bpru | awk {'print $3'} | xargs exim -Mrm
But the above commands do not work when the mail queue size is more than 100,000. It get stuck. So, I am using the following script which works fine regardless of the number of mails in the queue.
My question is, will it delete correctly ?
/etc/init.d/exim stop;
sleep 10;
killall -9 exim eximd
sleep 5;
#clean out the mail queue
find /var/spool/exim -mindepth 2 -type f -exec rm -rfv {} \;
#clean out the mail db files
find /var/spool/exim/db -type f -exec rm -rvf {} \;
/etc/init.d/exim restart
Mani
(634 rep)
Feb 19, 2016, 10:54 AM
• Last activity: Oct 11, 2022, 05:22 PM
0
votes
1
answers
586
views
shell access to cPanel user
I have a VPS hosting with WHM/cPanel access and I have root SSH access where I need to run commands from time to time. I have cron jobs there which are currently running as root, but what to switch to the user of the public_html (which is 'research', the same user I use for the cPanel account login)...
I have a VPS hosting with WHM/cPanel access and I have root SSH access where I need to run commands from time to time. I have cron jobs there which are currently running as root, but what to switch to the user of the public_html (which is 'research', the same user I use for the cPanel account login). the problem with root is (apart from being unsecure, I guess) is daily log files are being generated by root (if not already there), so the user research no longer can append to it, unless it generates the log file before root for that day.
Now, in order to change cron jobs to that user, I tried to login using
- research
, but the response is shell access not enabled on that account.
now I see the /etc/passwd entry for the user is following:
:x:1003:1005::/home/research:/usr/local/cpanel/bin/noshell
now my question is, is it safe to grant shell access to the cPanel user and use it like that (as the owner of public_html is that user), and if so then how to do that?
Nishu Ali
(3 rep)
Apr 12, 2022, 07:03 AM
• Last activity: Apr 12, 2022, 10:18 AM
1
votes
1
answers
116
views
Should I worry if 'pkexec' is in a cPanel user's /home/virtfs (CVE-2021-4034)?
The recent security bug CVE-2021-4034 in Linux involves `/usr/bin/pkexec`. Following media reports (zdnet, etc.) I changed its permission, but also found this file: `/home/virtfs/foo/usr/bin/pkexec` for cPanel user `foo`. I don't know why a user would have `pkexec` shadowed. Unfortunately we are run...
The recent security bug CVE-2021-4034 in Linux involves
/usr/bin/pkexec
. Following media reports (zdnet, etc.) I changed its permission, but also found this file:
/home/virtfs/foo/usr/bin/pkexec
for cPanel user foo
.
I don't know why a user would have pkexec
shadowed.
Unfortunately we are running an outdated WHM/cPanel (with root) on outdated CentOS 6, until we can migrate the last sites off it.
kitchin
(131 rep)
Jan 26, 2022, 06:38 AM
• Last activity: Feb 1, 2022, 08:02 AM
0
votes
1
answers
93
views
WHM / Rearrange an Account
I recently bought another block of storage from my provider and following their guide, I rearranged my accounts to it: 1. `sudo mkfs.ext4 /dev/vdb` 2. `sudo mkdir /mnt/vol-us-1` 3. `sudo mount -t ext4 /dev/vdb /mnt/vol-us-1` 4. `bin/bash -c "if [ $(cat /etc/fstab | grep -i /dev/vdb | awk '{print $1}...
I recently bought another block of storage from my provider and following their guide, I rearranged my accounts to it:
1.
***But then trying to move my account, WHM doesn't let me do it:***
sudo mkfs.ext4 /dev/vdb
2. sudo mkdir /mnt/vol-us-1
3. sudo mount -t ext4 /dev/vdb /mnt/vol-us-1
4. bin/bash -c "if [ $(cat /etc/fstab | grep -i /dev/vdb | awk '{print $1}')!="/dev/vdb" ]; then sudo bash -c 'echo \/dev/vdb /mnt/vol-us-1 ext4 defaults,nofail,discard,noatime 1 2\ >> /etc/fstab';fi"
This worked initially, but then I ran through an upgrade for WHM and I lost my settings, and the storage block seemed to have been wiped. I was able to recover from a backup, but not entirely.
***I can see in my Disk Usage report that the mount exists:***


James
(101 rep)
Nov 4, 2021, 03:56 PM
• Last activity: Nov 5, 2021, 02:37 PM
0
votes
1
answers
1329
views
CPanel New Domain
Background Note: When I first asked this here, I was told that it is off topic and I should ask at StackOverflow. StackOverflow said it is off topic and I should ask on ServerFault. Serverfault said it is off topic and I should ask on Unix&Linux. So, I am asking again here. I am trying to add a new...
Background Note: When I first asked this here, I was told that it is off topic and I should ask at StackOverflow. StackOverflow said it is off topic and I should ask on ServerFault. Serverfault said it is off topic and I should ask on Unix&Linux. So, I am asking again here.
I am trying to add a new domain using CPanel. I went into Addon Domains and added the domain. I went into the domain's folder and added an index.html file. When I go to http://sottovoci.net , I get
Template Error: The template file must be given (or the template could not be opened)
I've been Googling for a week and I haven't found a solution to this problem. However, I have found that if I go to http://sottovoci.net/index.html , I get the placeholder index page that I made. Further, if I go to http://www.sottovoci.net , it defaults to the index page. If I go to http://sottovoci.net , it default to http://sottovoci.net/cgi-sys/defaultwebpage.cgi instead of using index.html.
Now, having spent the weekend reading endless documentation that all says to just add the domain and it magically works, I am out of sources of information to search. Where does CPanel hide whatever setting it is that is redirecting to cgi-sys/defaultwebpage.cgi instead of index.html? How can I change it to use index.html instead of cgi-sys/defaultwebpage.cgi?
kainaw
(367 rep)
Mar 9, 2015, 01:13 PM
• Last activity: Feb 18, 2021, 02:00 PM
0
votes
2
answers
1513
views
$'\r': command not found — file encoding on CentosOS trough cPanel for cloud service
I am writing a silly script trough cPanel on a Centoss remote server, no so much I can do about it, the script need changes from time to time, and upload trough ftp each time get annoying because of the process. (that script is running on cron, directly from the system without us been able to change...
I am writing a silly script trough cPanel on a Centoss remote server, no so much I can do about it, the script need changes from time to time, and upload trough ftp each time get annoying because of the process.
(that script is running on cron, directly from the system without us been able to change it; and yes, we probably should switch could provider, but not now in out hands)
for each empty line, it returns me the $'\r': command not found meaning that the editor add those crapy end lines, so I have to overcome it by placing a hash (coment) on each empty line. However this raise another errors as "unexpected end of file", etc...
I am sure 99.99% is due to the codification the online editor saves the file...
(and again, we are basically forced to use this editor)
the editor, it allows to use all those encodings:
- ansi_x3.110-1983
- ansi_x3.4-1968
- armscii-8
- asmo_449
- big5
- big5-hkscs
- brf
- bs_4730
- bs_viewdata
- cp10007
- cp1125
- cp1250
- cp1253
- cp1254
- cp1255
- cp1256
- cp1257
- cp1258
- cp737
- cp770
- cp771
- cp772
- cp773
- cp774
- cp775
- csa_z243.4-1985-1
- csa_z243.4-1985-2
- csa_z243.4-1985-gr
- csn_369103
- cwi
- dec-mcs
- din_66003
- ds_2089
- ebcdic-at-de
- ebcdic-at-de-a
- ebcdic-ca-fr
- ebcdic-dk-no
- ebcdic-dk-no-a
- ebcdic-es
- ebcdic-es-a
- ebcdic-es-s
- ebcdic-fi-se
- ebcdic-fi-se-a
- ebcdic-fr
- ebcdic-is-friss
- ebcdic-it
- ebcdic-pt
- ebcdic-uk
- ebcdic-us
- ecma-cyrillic
- es
- es2
- euc-jisx0213
- euc-jp
- euc-jp-ms
- euc-kr
- euc-tw
- gb18030
- gb2312
- gb_1988-80
- gbk
- georgian-academy
- georgian-ps
- gost_19768-74
- greek-ccitt
- greek7
- greek7-old
- gsm03.38
- hp-greek8
- hp-roman8
- hp-roman9
- hp-thai8
- hp-turkish8
- hz-gb-2312
- ibm037
- ibm038
- ibm1004
- ibm1026
- ibm1047
- ibm1124
- ibm1129
- ibm1132
- ibm1133
- ibm1160
- ibm1161
- ibm1162
- ibm1163
- ibm1164
- ibm256
- ibm273
- ibm274
- ibm275
- ibm277
- ibm278
- ibm280
- ibm281
- ibm284
- ibm285
- ibm290
- ibm297
- ibm420
- ibm423
- ibm424
- ibm437
- ibm500
- ibm850
- ibm851
- ibm852
- ibm855
- ibm856
- ibm857
- ibm858
- ibm860
- ibm861
- ibm862
- ibm863
- ibm864
- ibm865
- ibm866
- ibm866nav
- ibm868
- ibm869
- ibm870
- ibm871
- ibm874
- ibm875
- ibm880
- ibm891
- ibm903
- ibm904
- ibm905
- ibm918
- ibm922
- iec_p27-1
- inis
- inis-8
- inis-cyrillic
- invariant
- isiri-3342
- iso-8859-1
- iso-8859-10
- iso-8859-11
- iso-8859-13
- iso-8859-14
- iso-8859-15
- iso-8859-16
- iso-8859-2
- iso-8859-3
- iso-8859-4
- iso-8859-5
- iso-8859-6
- iso-8859-7
- iso-8859-8
- iso-8859-9
- iso-8859-9e
- iso-ir-197
- iso-ir-209
- iso-ir-90
- iso_10367-box
- iso_10646
- iso_11548-1
- iso_2033-1983
- iso_5427
- iso_5427-ext
- iso_5428
- iso_646.basic
- iso_646.irv
- iso_6937
- iso_6937-2-25
- iso_6937-2-add
- iso_8859-1,gl
- iso_8859-supp
- it
- jis_c6220-1969-jp
- jis_c6220-1969-ro
- jis_c6229-1984-a
- jis_c6229-1984-b
- jis_c6229-1984-b-add
- jis_c6229-1984-hand
- jis_c6229-1984-hand-add
- jis_c6229-1984-kana
- jis_x0201
- johab
- jus_i.b1.002
- jus_i.b1.003-mac
- jus_i.b1.003-serb
- koi-8
- koi8-r
- koi8-ru
- koi8-t
- koi8-u
- ks_c_5601-1987
- ksc5636
- latin-greek
- latin-greek-1
- mac-centraleurope
- mac-cyrillic
- mac-is
- mac-sami
- mac-uk
- macintosh
- mik
- msz_7795.3
- nats-dano
- nats-dano-add
- nats-sefi
- nats-sefi-add
- nc_nc00-10
- nextstep
- nf_z_62-010
- nf_z_62-010_1973
- ns_4551-1
- ns_4551-2
- pt
- pt154
- pt2
- rk1048
- sami
- sami-ws2
- sen_850200_b
- sen_850200_c
- shift_jis
- shift_jisx0213
- t.101-g2
- t.61-7bit
- t.61-8bit
- tcvn5712-1
- tis-620
- tscii
- us-ascii
- utf-7
- utf-8
- videotex-suppl
- viscii
- windows-1251
- windows-1252
- windows-31j-
some seem incompatible, as file will not load, others load the file but keeps giving the same error...
and I am not finding the Unix file codification that should solve the issue
**what codification could I use?**
some (on askubuntu, before post got closed) recommend using dos2unix, that will be great if I could have some more access to the system, console, could install packages ... etc..
**it is anything I can do to scripting trough cPanel??**
____
update 01:
I try with:
export SHELLOPTS
set -o igncr
as https://superuser.com/questions/330781/trouble-editing-bash-profile-bash-r-command-not-found/330783 suggest,
then I got:
./_private/myScript.sh: line 2: export: `SHELLOPTS ': not a valid identifier
./_private/myScript.sh: line 3: set: igncr : invalid option name
________
update 02:
I read somewhere (sorry do not remember post) about -o igncr
so I ask (beg) to program the crons like:
(nice -n19 comes as "default", inevitable)
nice -n19 bash -x -o igncr ./_private/myScript.sh
bash -x -o igncr nice -n19 ./_private/myScript.sh
both cases: bash: line 0: bash: igncr: invalid option name
_____
I am guessing, start the script with a conditional
sed -i'.bak' s/\r//g ~/myScript.sh
if \r are found in the script??
(inspired on https://stackoverflow.com/questions/11616835/r-command-not-found-bashrc-bash-profile)
LisbetH
(1 rep)
Feb 7, 2021, 08:30 AM
• Last activity: Feb 7, 2021, 11:51 AM
1
votes
0
answers
114
views
monitor Apache current downloaing files
I'm using Apache to allow users of my application to download required updates. I want to know are there any methods to understand which files are currently downloading and which IP is downloading which file? As long as I know all files are downloaded by `GET` command in HTTP protocol however I don'...
I'm using Apache to allow users of my application to download required updates.
I want to know are there any methods to understand which files are currently downloading and which IP is downloading which file?
As long as I know all files are downloaded by
GET
command in HTTP protocol however I don't know if there is any commands or utility to let me know the download status. Something like what pure-ftpwho
do for clients of pure-ftpd
.
My server is Centos 7.9 with Cpanel/WHM installed on it.
VSB
(175 rep)
Dec 31, 2020, 09:13 AM
0
votes
0
answers
222
views
How Do I Free Up Disk Space to Install Centos 8?
I just purchased a Linux VPS thinking it came with Centos 8 but to my horror it does not appear to be installed. If I am to make use of this server I need cPanel or I can't use it all because my only experience with Linux servers is with cPanel. When I try to install Centos it says that the hard dri...
I just purchased a Linux VPS thinking it came with Centos 8 but to my horror it does not appear to be installed. If I am to make use of this server I need cPanel or I can't use it all because my only experience with Linux servers is with cPanel.
When I try to install Centos it says that the hard drive has zero free bytes. Is this a permissions problem or is the disk corrupt?
PostAlmostAnything
(1 rep)
Oct 29, 2020, 06:19 AM
• Last activity: Oct 29, 2020, 12:31 PM
Showing page 1 of 20 total questions