'asterisk' linux user password for correct file ownership

Hello.

As a common need, I’m using .call files to originate calls from FreePBX.
The problem with copying call files from another system, is that the default ownership of the file is ‘root’, so asterisk can’t write or move the file.

If I could login the sftp session using the ‘asterisk’ linux user - the file would be written with ‘asterisk’ as the owner, which will make life much easier…

Any help with this would be appreciated.

The asterisk user has no login ability and would not be recommended to allow such a thing.

Your best bet is probably to take a leaf out of FreePBX’ method/book and add an incron entry to “elevate permissions”, thusly chown then mv the .call file from the unprivileged place you put it to where it needs to be when you transfer them to the server.

Yup - we set up a Bells system at a school that calls the overhead paging and plays a recorded “Bell” for each class change - Stole the code from Asterisk: The Definitive Guide - here:

https://library.oreilly.com/book/0636920025894/asterisk-the-definitive-guide-4th-edition/toc