arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VPS 18 - /bin/bash Premission Denied
#9
Here is my report after getting all necessary information to took a look at the VPS from the available emergency console/VNC.

Basically it is exactly as I said before. The user(s) can no longer access their default shell. When you login as a user a shell is started for that user. The reason for that from your previous error message with "/bin/bash: permission denied" is that either the permission for /bin/bash is incorrectly or SELinux is being very overprotective (most likely the case as this started happening after you enabled SELinux and rebooted your server).

The bad news: login from the normal Linux TTY is also not possible! You instantly get logged off because the shell cannot be started. It's basically a loop. You type in your username and password, you are logged in for a very brief tiny moment and land at the login screen again. Everytime! That's a big mess right there! And maybe another bad news: you cannot even boot into the rescue mode of CentOS 7 because the exact same issue happens there. The rescue shell uses sh instead of bash and we're getting a "/bin/sh: permission denied" and it continues to boot into normal mode after a few seconds.

So the internal rescue mode of CentOS is useless, too. Thankfully there was a CentOS 8 ISO available. I mounted it and restarted the VPS. In the CentOS 8 ISO bootloader I could select a option to run a system rescue mode. The rescue mode mounts the installed CentOS into /mnt/sysimage and from there on you can access all files through the rescue sh shell of CentOS 8. I edited /etc/selinux/config (/mnt/sysimage/etc/selinux/config) and set SELINUX to disabled. I saved the file and rebooted the VPS. It started from the installed CentOS 7 and I could login normally in the Linux TTY and also in SSH.

That's about it. SELinux was overly protective and broke pretty much the whole system. To be honest: SELinux is cancer. Not only that NSA was working on it but it's kinda not helpful at all.

Your VPS is working again.
[Image: zHHqO5Q.png]
lockThread Closed 


Messages In This Thread
RE: VPS 18 - /bin/bash Premission Denied - by Mashiro - 12-07-2019, 01:34 PM

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting