How to Deal with SELinux AVC Denials (GUI)?

Issues related to applications and software problems and general support
tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: How to Deal with SELinux AVC Denials (GUI)?

Post by tunk » 2020/10/28 17:06:14

Did you run this after chmod:
sudo -u asterisk vim /etc/asterisk/modules.conf

PS: If you don't like vim, then you could try nano
instead (may not be installed by default).

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to Deal with SELinux AVC Denials (GUI)?

Post by TrevorH » 2020/10/28 17:11:26

You don't even appear to have asterisk installed. Or if you do then you removed all of its config files.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

prabha_friend
Posts: 68
Joined: 2020/06/10 14:05:16

Re: How to Deal with SELinux AVC Denials (GUI)?

Post by prabha_friend » 2020/10/29 15:27:44

TrevorH wrote:
2020/10/28 17:11:26
You don't even appear to have asterisk installed. Or if you do then you removed all of its config files.
Yes. You are Right But You are Wrong.

I am not the culprit but the following Screenshot is:
This is the culprit...
This is the culprit...
SELinux Torture.jpg (189.05 KiB) Viewed 819 times
The above screen is showing from the first restart after I installed Asterisk. I seriously suspect that SELinux AVC Denials (GUI) is causing all the problems. In the book, the author is not using a GUI version (CentOS 7 Minimal) so I guess he must not be having this SELinux AVC Denials and the other respectives. So, there is no chance for the files getting written before the commands. Since, I using a GUI version I Guess that SELinux wakes up early and do the antivirus thing of activities. Please reply.

Thanks for your support.

Thanks and Regards,
Prabhakaran

P.S:
Please don't get annoyed. I hope this problem will be fixed in a Day or Two. Hope you Help. Thanks

prabha_friend
Posts: 68
Joined: 2020/06/10 14:05:16

Re: How to Deal with SELinux AVC Denials (GUI)?

Post by prabha_friend » 2020/10/29 15:31:36

The Author says:
Asterisk configuration files use the semicolon (;) character for
comments, primarily because the hash character (#) is a valid character
on a telephone number pad.

Code: Select all

$ sudo chown asterisk:asterisk /etc/asterisk ; sudo chmod 664 /etc/asterisk
Meaning the chmod command is just a comment?

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to Deal with SELinux AVC Denials (GUI)?

Post by TrevorH » 2020/10/29 16:04:45

No, that's something different. Please run sudo ls -la /etc/asterisk (using sudo that will run as root so will list it even if the permissions are wrong_.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

prabha_friend
Posts: 68
Joined: 2020/06/10 14:05:16

Re: How to Deal with SELinux AVC Denials (GUI)?

Post by prabha_friend » 2020/10/29 16:13:58

Code: Select all

[astmin@localhost ~]$ sudo ls -la /etc/asterisk                                                                                                                         
[sudo] password for astmin:                                                                                                                                             
total 12                                                                                                                                                                
drwxrwxr-x.   2 asterisk asterisk    6 Oct 25 17:19 .                                                                                                                   
drwxr-xr-x. 142 root     root     8192 Oct 29 21:35 ..                                                                                                                  
[astmin@localhost ~]$      

prabha_friend
Posts: 68
Joined: 2020/06/10 14:05:16

Re: How to Deal with SELinux AVC Denials (GUI)?

Post by prabha_friend » 2020/10/29 16:29:09

Code:

Code: Select all

[astmin@localhost ~]$ cd /var/lib/asterisk/
[astmin@localhost asterisk]$ ls -lt
Result:

Code: Select all

total 8
-rw-r--r--. 1 root root 3072 Oct 25 19:20 astdb.sqlite3
drwxr-xr-x. 2 root root  267 Oct 25 17:22 rest-api
drwxr-xr-x. 2 root root 4096 Oct 25 17:22 moh
drwxr-xr-x. 3 root root   16 Oct 25 17:20 sounds
drwxr-xr-x. 2 root root   49 Oct 25 17:20 images
drwxr-xr-x. 2 root root  147 Oct 25 17:20 static-http
drwxr-xr-x. 3 root root   91 Oct 25 17:20 documentation
drwxr-xr-x. 3 root root   23 Oct 25 17:19 third-party
drwxr-xr-x. 2 root root  133 Oct 25 17:19 scripts
drwxr-xr-x. 2 root root    6 Oct 25 17:19 agi-bin
drwxr-xr-x. 2 root root    6 Oct 25 17:19 phoneprov
drwxr-xr-x. 2 root root    6 Oct 25 17:19 keys
drwxr-xr-x. 3 root root   17 Oct 25 17:19 firmware
[astmin@localhost asterisk]$ 

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to Deal with SELinux AVC Denials (GUI)?

Post by TrevorH » 2020/10/29 16:56:45

So that confirms it then, you have NO asterisk config files present and the only reason for that that I can think of is that it is not installed.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply