Re: [asterisk-users] extensions.conf asterisk 18.8.0 question

2022-01-11 Thread Antony Stone
On Tuesday 11 January 2022 at 17:20:44, Michael Englehorn wrote:

> If you're on RHEL or CentOS or one of its descendants,

Oh, now that reminds me that those systems also tend to alias "rm" to "rm -i", 
so they won't delete files without confirmation.

Irritating in general IMHO, but it might be the cause of your puzzlement...

> ‐‐‐ Original Message ‐‐‐
> 
> On Monday, January 10th, 2022 at 1:03 PM, Jerry Geis wrote:
> > I am trying to run this command:
> > exten => _4XX,n,System(/usr/bin/rm /tmp/test.incoming.txt)
> > 
> > 
> > From the log:
> > Executing [402@smvoice-sip:7] System("SIP/103-0018", "/usr/bin/rm
> > /tmp/test.incoming.txt") in new stack
> > 
> > 
> > Is "rm" not an allowed command - the above file is not removed.
> > -rw-rw-rw- 1 silentm silentm 3 Jan 10 14:02 /tmp/test.incoming.txt


Antony.

-- 
Just when you think you're done, a cat floats by with buttered toast strapped 
to its back.

 - Steve Krug, "Don't make me think"

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] extensions.conf asterisk 18.8.0 question

2022-01-11 Thread Michael Englehorn
If you're on RHEL or CentOS or one of its descendants, I would check if SELinux 
is enforcing (`sestatus` or `cat /etc/selinux/config` and look for 
"SELINUX=enforcing"), if it is, you'll probably need to create a policy to 
allow the Asterisk context to execute rm and/or delete files.
I use `audit2why` and `audit2allow` in policycoreutils-devel (on CentOS) to 
generate SELinux policy modules.

-Michael Englehorn

‐‐‐ Original Message ‐‐‐
On Monday, January 10th, 2022 at 1:03 PM, Jerry Geis  
wrote:

> I am trying to run this command:
> exten => _4XX,n,System(/usr/bin/rm /tmp/test.incoming.txt)
> 

> From the log:
> Executing [402@smvoice-sip:7] System("SIP/103-0018", "/usr/bin/rm 
> /tmp/test.incoming.txt") in new stack
> 

> Is "rm" not an allowed command - the above file is not removed.
> -rw-rw-rw- 1 silentm silentm 3 Jan 10 14:02 /tmp/test.incoming.txt
> 

> Thanks!
> 

> Jerry

publickey - michael@englehorn.com - 0x8B2C043D.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users