SELinux consumes 100% CPU

I am using an IBM x3650 server with Linux CentOS 7.4 installed. With the support of VMWare 12, one of 3 virtual servers simulated with 8G memory and some disk space. It is unknown how many resources the Server (the first server in red in the figure below) can actually use.

The picture above is the practice environment provided by the school when I was preparing for the RHCE exam, using VMWare 12. The dotted lines are virtual machines, and the operating system inside is Linux CentOS 7.0. However, we only need to use 4 units, namely

1、Virtual Server

2. Classroom, the computer of the examiner during the exam, provides the software required for domain name resolution and yum software warehouse

3. Server, the virtual machine that often acts as Server during exams

4. Desktop, the virtual machine that often acts as a client during exams

After entering Virtual Server, you can do this in the shell terminal

rht-vmctl start classroom

The above command will start classroom, of course it can also be server or desktop.

rht-vmctl reset classroom

The above command will reset the classroom, of course it can also be server or desktop. The changes made are gone, completely restored.

rht-vmctl stop classroom

The above command will stop classroom, of course it can also be server or desktop.

In Virtual Server, you can, in general, use ssh to log in to the server or classroom.

ssh root @server //login to server

ssh root @desktop  //Log in to desktop

As an exercise, after installing the Samba server, the first thing to do is to remove the restrictions on Samba in SELinux. The second thing is to add the Samba service to the firewall. However, I'll see if SELinux has limitations first.

getsebool -a | grep samba

You can see that a group of settings are all off, off, and not allowed. Then open it up.

setebool -P samba_export_all_rw = on

I log in to this Client virtual server with ssh in the virtual server Server. After returning to the car, there was no movement for a long time, and he died. Look again, the virtual machine manager of the graphical interface shows that the CPU is occupied at 100%. Had to force it to stop. Come again.

setebool -P samba_export_all_rw = on &

Add a space after it, and then add such a symbol to let the command run in the background. It immediately returns two numbers, one is the background task number and one is the real pid number. Another dozen seconds passed. The two lines of text below are displayed.

Full path required for exclude: net:[4026532311].
Full path required for exclude: net:[4026532311].

However, looking at the permissions again, it has been set successfully. Not sure what this error message means. If you know anything, please feel free to leave a message. thanks.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325468700&siteId=291194637