SELinux Usage in Alibaba Cloud ECS

SELinux Enablement Steps

  1. Enabling SELinux on a public image from Alibaba Cloud (CentOS, Ubuntu, etc.)
  2. Enabling SELinux using a custom image, for example imported from an on-premise instance or another cloud provider
[root@iZgw8ewbsczw0lh3yt7is5Z ~]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@iZgw8ewbsczw0lh3yt7is5Z ~]# touch ./autorelabel
[root@iZgw8ewbsczw0lh3yt7is5Z ~]# shutdown -r now
[root@iZgw8ewbsczw0lh3yt7is5Z ~]# getenforce
[root@iZgw8ewbsczw0lh3yt7is5Z ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 31

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Maximum Sum Circular Subarray

Everything you need to know to resolve the Git Push RPC error

Dynstr — HackTheBox

Managing Camel Rest Services using Red Hat 3Scale API Management

This images show how to create a NEW API when opening a 3Scale Admin Portal

2 is better than 1: Make way for HTTP/2

Dynamic form system comparison

Double Submit Cookies  Pattern

Organizing a summer camp in Ruby.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

How to install Elasticsearch and Kibana version 8.1 on RHEL For Beginner

EP.1 |how to install kubeflow on localhost ?

How AWS instance type and max connections are related

Self managed EFK Setup for 10 billion+ documents