473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Disable Selinux Temporarily

I want to dislabe SeLinux but this will be temporary where after reboot it should be enabled.-
Jun 1 '20 #1
1 6166
cetpainfotech
15 Byte
To temporarily disable SELinux, you can use the command "setenforce 0". This command sets SELinux to permissive mode, which disables the enforcement of SELinux policies but still logs any violations.

To make sure SELinux is enabled after reboot, you can add the command "setenforce 1" to a script that runs at startup.

Here are the steps to disable SELinux temporarily and enable it after reboot:

1. Run the command "setenforce 0" to temporarily disable SELinux.

2. Create a script that runs at startup. You can create a script in /etc/rc.d/init.d/ or /etc/rc.local

3. Add the command "setenforce 1" to the script you created.

4. Make the script executable by running the command "chmod +x /path/to/script"

5. Add the script to the startup process, this will vary based on your distro.

6. Reboot your system to test if SELinux is enabled after reboot.

It's important to keep in mind that SELinux is a security feature, and it's generally a good idea to keep it enabled. If you're experiencing problems with SELinux, it's usually best to try to troubleshoot and resolve the issues rather than disabling it.
Jan 28 '23 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ben Xia | last post by:
Looks like this is a common issue: If you installed linux Fedora 3 with the default configuration and latest patches, you will have Apache/2.0.53 (Fedora) and PHP 4.3.11 in your box. Without...
6
by: Tuong Do | last post by:
Hi, I am going to insert a large amount (200,000 records) of data into a table Is there a way that I can temporarily disable the log? so that the insertion run faster Thanks in advance
7
by: Scott Emick | last post by:
How can I disable events for the controls on a form? I tried setting the form's enable property to false, but that doesn't stop events from firing on its controls. I need to temporarily disable...
3
by: jojobar | last post by:
Hello, I am trying to localize an existing application (asp.net 2.0). using implicit as well as explicit localization. Asp.net 2.0 uses App_LocalResources folder for implicit localization....
4
by: Marc Solé | last post by:
Hello everybody, I have a little "problem". I have a DataGridView that is loaded automatically by code sometimes, and manually by the user other times. When the user introduces data in the...
4
by: Jon Slaughter | last post by:
Is there any method to temporarily disable focus changing?(I assume only method is tab or mouse?) This problem has been tieing me up for a while and nothing seems to work. The only thing that I...
37
by: Vince C. | last post by:
Hi all. I've installed Bloodshed Dev-C++ on a Windows 2000 SP4 machine. I'm using MinGW 3.4.2. I'd like to temporarily disable standard functions to write to stderr, i.e. for instance...
3
hsriat
by: hsriat | last post by:
How can I temporarily disable vertical scrollbar? I have replaced confirmation boxes and alert boxes with inlay popup DIVs. But while they are on the screen, I need to disable scrollbar of the...
3
by: mfaisalwarraich | last post by:
Hi everyone, I am not an expert in linux but i saw that some people run apache in a chroot jailed environment so that im ever website compromised the attacker will only have access to its jailed...
4
by: Daemon1953 | last post by:
Ok, another question. This is my first effort at building a database for an organisation so I am trying not to use quick and dirty methods to get around issues. What I want to do (and probably can't)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.