[asterisk-users] Unable to access the running directory (Permission denied).

Steve Edwards asterisk.org at sedwards.com
Sat Apr 7 21:41:17 CDT 2012

> On 04/07/2012 04:20 PM, Noah Engelberth wrote:

>> In order to reconnect to asterisk (asterisk -r), you need root 
>> permissions. So either you have to do it as root (bad), or use sudo to 
>> do it as user asterisk (recommended).

If you use 'sudo -u asterisk' you do not have root permissions.

Also, wouldn't it kind of defeat the whole idea of running as non-root if 
you needed root permissions to connect to the console?

On Sat, 7 Apr 2012, sean darcy wrote:

> Hmm. Surprising. I would have thought you could reconnect to asterisk if 
> you were the user under which asterisk was running. But ok, will use 
> sudo.

I'm just a 1.2 Luddite, but...

Aside from read access to the executable, the modules and the 
configuration directories, I think the other 'requirements' you may be 
running afoul of are read access to the PID and read/write access to the 
socket which reside (in CentOS) in /var/run/ and are named asterisk.ctl 
and asterisk.pid

Thanks in advance,
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

More information about the asterisk-users mailing list