Ad Widget

Collapse

Ncat: Permission denied.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • artesah
    Junior Member
    • Feb 2020
    • 5

    #1

    Ncat: Permission denied.

    Hello!
    In alertscripts directory, I created a script that should send data to a socket.

    Code:
     
     #!/bin/bash  ip="$1" subj="$2" message="$3" to_send="{"subj": "${subj}", "message": "${message}"}"  /usr/bin/echo ${to_send} |/usr/bin/ncat ${ip} 3434
    But i get an error Ncat: Permission denied.

    Click image for larger version

Name:	Selection_014.png
Views:	957
Size:	14.3 KB
ID:	395008



    How to fix this problem?
    Thanks!
  • almarstah
    Junior Member
    • Jul 2020
    • 1

    #2
    I had this same issue recently. Turned out SELinux was enabled. You can temporarily disable by running: setenforce 0

    To fully disable SELinux, edit the /etc/selinux/config file and set the SELINUX=disabled, then reboot the server

    Comment

    Working...