Not setting $XDG_RUNTIME_DIR, as the directory is not in order.
Hello,
Looking for a bit of clarification here please.
What are the expected uid:gid directory permissions of directories sitting under /run/user ?
CloudLinux 4.18.0-477.27.2.lve.el8.x86_64
OS CloudLinux v8.8.0 STANDARD standard
cPanel Version 114.0.11
Runtime directory '/run/user/xxxx' is not owned by UID xxxx, as it should.
Not setting $XDG_RUNTIME_DIR, as the directory is not in order.
Interestingly the issue arises on some accounts (not all) :
a) SFTP (WinSCP) user logs into an account
b) a wheel group user who has permissions to escalate to root logs in
c) an application that has permissions to login as root to perform tasks, eg: account removal (whmcs)
I checked the directory permissions of all directories under /run/user and they are/were all set as root:root
After modifying the ownership of the directories to match the uid:gid of the user shown in /etc/passwd the errors desist other than the usual 'Device or resource busy' which CloudLinux support pages say can be safely ignored.
So what are the correct permissions for the /run/user directory, trying to get my head around what is going on.
SFTP
Nov 9 23:05:14 ourserverhost sshd[2870224]: pam_unix(sshd:session): session opened for user regular_sftp_user by (uid=0)
Nov 9 23:05:22 ourserverhost sshd[2870291]: Accepted publickey for regular_sftp_user from xxx.xxx.xxx.xx port 49995 ssh2: RSA SHA256:_____________
Nov 9 23:05:22 ourserverhost systemd[2870299]: pam_systemd(systemd-user:session): Runtime directory '/run/user/xxxx' is not owned by UID xxxx, as it should.
Nov 9 23:05:22 ourserverhost systemd[2870299]: pam_systemd(systemd-user:session): Not setting $XDG_RUNTIME_DIR, as the directory is not in order.
Nov 9 23:05:22 ourserverhost systemd[2870299]: pam_unix(systemd-user:session): session opened for user regular_sftp_user by (uid=0)
Nov 9 23:05:22 ourserverhost sshd[2870291]: pam_systemd(sshd:session): Runtime directory '/run/user/xxxx' is not owned by UID xxxx, as it should.
Nov 9 23:05:22 ourserverhost sshd[2870291]: pam_systemd(sshd:session): Not setting $XDG_RUNTIME_DIR, as the directory is not in order.
SFTP
Nov 10 10:15:03 ourserverhost sshd[3127220]: Accepted publickey for regular_sftp_user from xxx.xxx.xxx.xx port 61020 ssh2: RSA SHA256:_____________
Nov 10 10:15:03 ourserverhost systemd[3127383]: pam_systemd(systemd-user:session): Runtime directory '/run/user/xxxx' is not owned by UID xxxx, as it should.
Nov 10 10:15:03 ourserverhost systemd[3127383]: pam_systemd(systemd-user:session): Not setting $XDG_RUNTIME_DIR, as the directory is not in order.
Nov 10 10:15:03 ourserverhost systemd[3127383]: pam_unix(systemd-user:session): session opened for user regular_sftp_user by (uid=0)
Nov 10 10:15:03 ourserverhost sshd[3127220]: pam_systemd(sshd:session): Runtime directory '/run/user/xxxx' is not owned by UID xxxx, as it should.
Nov 10 10:15:03 ourserverhost sshd[3127220]: pam_systemd(sshd:session): Not setting $XDG_RUNTIME_DIR, as the directory is not in order.
Nov 10 10:15:03 ourserverhost sshd[3127220]: pam_unix(sshd:session): session opened for user regular_sftp_user by (uid=0)
SFTP
Nov 10 10:15:38 ourserverhost sshd[3127581]: Accepted publickey for regular_sftp_user from xxx.xxx.xxx.xx port 61021 ssh2: RSA SHA256:_____________
Nov 10 10:15:38 ourserverhost systemd[3127588]: pam_systemd(systemd-user:session): Runtime directory '/run/user/xxxx' is not owned by UID xxxx, as it should.
Nov 10 10:15:38 ourserverhost systemd[3127588]: pam_systemd(systemd-user:session): Not setting $XDG_RUNTIME_DIR, as the directory is not in order.
Nov 10 10:15:38 ourserverhost systemd[3127588]: pam_unix(systemd-user:session): session opened for user regular_sftp_user by (uid=0)
Nov 10 10:15:38 ourserverhost sshd[3127581]: pam_systemd(sshd:session): Runtime directory '/run/user/xxxx' is not owned by UID xxxx, as it should.
Nov 10 10:15:38 ourserverhost sshd[3127581]: pam_systemd(sshd:session): Not setting $XDG_RUNTIME_DIR, as the directory is not in order.
Wheel group user
Nov 10 11:09:38 ourserverhost sshd[3138504]: Accepted publickey for wheel_group_user from xxx.xxx.xxx.xx port 59435 ssh2: RSA SHA256:_____________
Nov 10 11:09:38 ourserverhost systemd[3138525]: pam_systemd(systemd-user:session): Runtime directory '/run/user/xxxx' is not owned by UID xxxx, as it should.
Nov 10 11:09:38 ourserverhost systemd[3138525]: pam_systemd(systemd-user:session): Not setting $XDG_RUNTIME_DIR, as the directory is not in order.
Nov 10 11:09:38 ourserverhost systemd[3138525]: pam_unix(systemd-user:session): session opened for user ruraldigitalcom by (uid=0)
Nov 10 11:09:38 ourserverhost sshd[3138504]: pam_systemd(sshd:session): Runtime directory '/run/user/xxxx' is not owned by UID xxxx, as it should.
Nov 10 11:09:38 ourserverhost sshd[3138504]: pam_systemd(sshd:session): Not setting $XDG_RUNTIME_DIR, as the directory is not in order.
The errors also cropped up when certain cronjobs are run until I changed the uid:gid of the directories:
Cron
php -q /home/xxxxx/public_html/crons/cron.php escalations
/usr/bin/curl -s path_to_script >/dev/null 2>&1
The latter runs on lots of other accounts on the server but only one is affected.
Thank you.
Please sign in to leave a comment.
Comments
0 comments