dialparties.agi: Permission denied.

sleepymatt

Joined
Dec 7, 2010
Messages
4
Likes
0
Points
0
#1
Heyo!

I'm new to Elastix v2.0 and loving it so far! Having a weird problem though and I see other people have had this issue as well. I'm using a hosted PBX at rentpbx.com with full root access. Basically I have to chmod 777 dialparties.agi every time I reload the configuration otherwise incoming calls are dropped. I saw one comment to yum update elastix which I did but that has not fixed the issue. Here is the CLI output:

-- Executing [s@macro-dial:3] AGI("SIP/L2V1_3973-00000002", "dialparties.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Failed to execute '/var/lib/asterisk/agi-bin/dialparties.agi': Permission denied
-- Executing [s@macro-dial:4] NoOp("SIP/L2V1_3973-00000002", "Returned from dialparties with no extensions to call and DIALSTATUS: ") in new stack

Edit: Looks like i'm also having the same issue with fixlocalprefix.agi
-- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
fixlocalprefix: Failed to execute '/var/lib/asterisk/agi-bin/fixlocalprefix': Permission denied

Any ideas?

Thanks
Matt
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#2
/var/lib/asterisk/

is the asterisk user's home directory:

cat /etc/passwd|grep asterisk

should reply something like

asterisk:x:100:101:Asterisk VoIP PBX:/var/lib/asterisk:/bin/bash

it needs to be owned by asterisk and dialparties.agi needs execute permissions for that user

if

ls -l /var/lib/asterisk/

doesn't reflect that and


ls -l /var/lib/asterisk/agi-bin/dialparties.agi
and



doesn't reply with something like :-

32 -rwxr-xr-- 1 asterisk asterisk 31208 Dec 7 11:25 /var/lib/asterisk/agi-bin/dialparties.agi

yu will need to speak with your hosting company.
 

sleepymatt

Joined
Dec 7, 2010
Messages
4
Likes
0
Points
0
#3
Hey Dicko,

Thanks so much for the quick reply. I ran all the commands you suggested and everything seems to be checking out just fine.

[root@nextech agi-bin]# cat /etc/passwd|grep asterisk
asterisk:x:100:101:Asterisk VoIP PBX:/var/lib/asterisk:/bin/bash
[root@nextech agi-bin]# ls -l /var/lib/asterisk/
total 60
drwxrwxrwx 3 asterisk asterisk 4096 Nov 24 12:27 agi-bin
-rw-rw-r-- 1 asterisk asterisk 16384 Dec 7 12:50 astdb
drwxrwxr-x 2 asterisk asterisk 4096 Nov 24 12:32 bin
drwxrwxr-x 3 asterisk asterisk 4096 Nov 24 12:26 documentation
drwxrwxr-x 3 asterisk asterisk 4096 Oct 3 14:00 firmware
drwxrwxr-x 2 asterisk asterisk 4096 Nov 24 12:26 images
drwxrwxr-x 2 asterisk asterisk 4096 Nov 24 12:26 keys
drwxrwxr-x 2 asterisk asterisk 4096 Nov 24 12:29 moh
drwxrwxr-x 5 asterisk asterisk 4096 Nov 24 12:28 mohmp3
drwxrwxr-x 2 asterisk asterisk 4096 Nov 24 12:26 phoneprov
drwxrwxr-x 9 asterisk asterisk 4096 Nov 24 12:27 sounds
drwxrwxr-x 3 asterisk asterisk 4096 Nov 24 12:26 static-http
[root@nextech agi-bin]# ls -l /var/lib/asterisk/agi-bin/dialparties.agi
-rwxrwxrwx 1 asterisk asterisk 31260 Dec 7 04:24 /var/lib/asterisk/agi-bin/dialparties.agi
[root@nextech agi-bin]#

I also used find | grep dialparties.agi & find | grep fixlocalprefix and chmod 777 everything it found but every time I apply configuration changes it goes right back to Permission Denied.

I dunno ... could it be some other problem with my hosting provider?

Matt
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#4
Hard to say, perhaps make sure your web service is running as the asterisk user

ps aux |grep httpd

Unfortunately all "providers" are not created equally many are just incompetent.

at the shell

su asterisk

can be diagnostic as you should then be able to tentatively run processes as that user, and be able to access all the directory structures and binaries as needed and further run any executable therin, including /tmp/ /etc/ /var/lib/asterisk /var/spool/asterisk /var/www/html/ /usr/sbin /usr/bin /bin /sbin /usr/local/sbin /usr/local/bin etc.
 

eNoisy

Joined
Jul 24, 2010
Messages
59
Likes
0
Points
0
#5
I had the same issue few days ago. Solved it by running 'yum update'

Cheers!
 

fxlm58

Joined
Feb 13, 2010
Messages
3
Likes
0
Points
0
#6
I'm also experiencing this issue, every time I do an update via the Web the permission change and also when I reboot.
I'm using version 2.0.3 and update to the latest yum updates!
Is there a fix to this issue?
 

relaxtelecom

Joined
Aug 4, 2010
Messages
11
Likes
0
Points
0
#7
i also have the same problem. Every time I make a change to the system and reload I have too change the permissions on dialparties.agi or my ring roups don't work
 

fmvillares

Joined
Sep 8, 2007
Messages
1,785
Likes
0
Points
0
#8
one question for the record how many of us tried the dicko comment and how many the yum upgrade and in which versions are you
 

relaxtelecom

Joined
Aug 4, 2010
Messages
11
Likes
0
Points
0
#9
I tried the dicko comment and the yum update.

Kernel
Linux(x86_64)-2.6.18-194.3.1.el5

Elastix
elastix-2.0.0-58
elastix-asterisk-sounds-1.2.3-1
elastix-addons-2.0.0-19
elastix-firstboot-2.0.0-14
elastix-reports-2.0.0-20
elastix-callcenter-2.0.0-12
elastix-pbx-2.0.0-41
elastix-distributed_dialplan-2.0.0-3
elastix-agenda-2.0.0-24
elastix-system-2.0.0-38
elastix-vtigercrm-5.1.0-8
elastix-a2billing-1.3.0-4
elastix-conferenceroom-0.0.0-10
elastix-email_admin-2.0.0-23
elastix-fax-2.0.0-18

RounCubeMail
RoundCubeMail-0.3.1-5

Mail
postfix-2.3.3-2.1.el5_2
cyrus-imapd-2.3.7-7.el5_4.3

IM
openfire-3.5.1-3

FreePBX
freePBX-2.7.0-8

Asterisk
asterisk-1.6.2.13-0
asterisk-perl-0.10-2
asterisk-addons-1.6.2.1-0

FAX
hylafax-4.3.9-0rhel5
iaxmodem-1.2.0-1.1

DRIVERS
dahdi-2.3.0.1-3
rhino-0.99.3-2.beta2
wanpipe-util-3.5.14-0
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#10
Are you in the Elastix embedded FreePBX or the Unembedded FreePBX when you reload?
 

relaxtelecom

Joined
Aug 4, 2010
Messages
11
Likes
0
Points
0
#11
unembedded. don't tend to use the embedded i will see if this does the same.
 

relaxtelecom

Joined
Aug 4, 2010
Messages
11
Likes
0
Points
0
#12
Just tried in the embedded and get the same dialparties.agi has changed permissions
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#13
how about running:

/var/www/html/admin/modules/framework/bin/module_admin reload

that's what pressing the bar does. it is called also from


/var/www/html/admin/modules/framework/bin/freepbx_engine

whioch comtains

chmod u+x,g+x $ASTVARLIBDIR/bin/*
chown -R $AMPASTERISKUSER:$AMPASTERISKGROUP $ASTVARLIBDIR/bin/*
chown -R $AMPASTERISKUSER:$AMPASTERISKGROUP $AMPBIN/*


where ASTVARLIB is defined in /etc/amportal.conf, check that first

then amportal chown for verifying
 

relaxtelecom

Joined
Aug 4, 2010
Messages
11
Likes
0
Points
0
#14
Hi

Sorry same result!
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#15
I expanded my post with a little more info to help you diagnose
 

relaxtelecom

Joined
Aug 4, 2010
Messages
11
Likes
0
Points
0
#16
i ran

chmod u+x,g+x $ASTVARLIBDIR/bin/*
chown -R $AMPASTERISKUSER:$AMPASTERISKGROUP $ASTVARLIBDIR/bin/*

which did not change dialparties.agi

when i ran the next line i got the following errors
chown: changing group of `/proc/3305': Operation not permitted
chown: changing group of `/proc/3306/task/3306': Operation not permitted
chown: changing group of `/proc/3306': Operation not permitted
chown: changing group of `/proc/3312/task/3312': Operation not permitted
chown: changing group of `/proc/3312': Operation not permitted
chown: changing group of `/proc/3313/task/3313': Operation not permitted
chown: changing group of `/proc/3313': Operation not permitted
chown: changing group of `/proc/3332/task/3332': Operation not permitted
chown: changing group of `/proc/3332/task/3339': Operation not permitted
chown: changing group of `/proc/3332/task/3340': Operation not permitted
chown: changing group of `/proc/3332/task/3342': Operation not permitted
chown: changing group of `/proc/3332/task/3344': Operation not permitted
chown: changing group of `/proc/3332': Operation not permitted
chown: changing group of `/proc/3338/task/3338': Operation not permitted
chown: changing group of `/proc/3338': Operation not permitted
chown: changing group of `/proc/3369/task/3369': Operation not permitted
chown: changing group of `/proc/3369': Operation not permitted
chown: changing group of `/proc/3383/task/3383': Operation not permitted
chown: changing group of `/proc/3383': Operation not permitted
chown: changing group of `/proc/3386/task/3386': Operation not permitted
chown: changing group of `/proc/3386': Operation not permitted
chown: changing group of `/proc/3402/task/3402': Operation not permitted
chown: changing group of `/proc/3402': Operation not permitted
chown: changing group of `/proc/3404/task/3404': Operation not permitted
chown: changing group of `/proc/3404': Operation not permitted
chown: changing group of `/proc/3405/task/3405': Operation not permitted
chown: changing group of `/proc/3405': Operation not permitted
chown: changing group of `/proc/3406/task/3406': Operation not permitted
chown: changing group of `/proc/3406': Operation not permitted
chown: changing group of `/proc/3407/task/3407': Operation not permitted
chown: changing group of `/proc/3407': Operation not permitted
chown: changing group of `/proc/3408/task/3408': Operation not permitted
chown: changing group of `/proc/3408': Operation not permitted
chown: changing group of `/proc/3409/task/3409': Operation not permitted
chown: changing group of `/proc/3409': Operation not permitted
chown: changing group of `/proc/3410/task/3410': Operation not permitted
chown: changing group of `/proc/3410': Operation not permitted
chown: changing group of `/proc/3411/task/3411': Operation not permitted
chown: changing group of `/proc/3411': Operation not permitted
chown: changing group of `/proc/3412/task/3412': Operation not permitted
chown: changing group of `/proc/3412': Operation not permitted
chown: changing group of `/proc/3413/task/3413': Operation not permitted
chown: changing group of `/proc/3413': Operation not permitted
chown: changing group of `/proc/3414/task/3414': Operation not permitted
chown: changing group of `/proc/3414': Operation not permitted
chown: changing group of `/proc/3415/task/3415': Operation not permitted
chown: changing group of `/proc/3415': Operation not permitted
chown: changing group of `/proc/3416/task/3416': Operation not permitted
chown: changing group of `/proc/3416': Operation not permitted
chown: changing group of `/proc/3417/task/3417': Operation not permitted
chown: changing group of `/proc/3417': Operation not permitted
chown: changing group of `/proc/3418/task/3418': Operation not permitted
chown: changing group of `/proc/3418': Operation not permitted
chown: changing group of `/proc/3419/task/3419': Operation not permitted
chown: changing group of `/proc/3419': Operation not permitted
chown: changing group of `/proc/3420/task/3420': Operation not permitted
chown: changing group of `/proc/3420': Operation not permitted
chown: changing group of `/proc/3421/task/3421': Operation not permitted
chown: changing group of `/proc/3421': Operation not permitted
chown: changing group of `/proc/3422/task/3422': Operation not permitted
chown: changing group of `/proc/3422': Operation not permitted
chown: changing group of `/proc/3423/task/3423': Operation not permitted
chown: changing group of `/proc/3423': Operation not permitted
chown: changing group of `/proc/3424/task/3424': Operation not permitted
chown: changing group of `/proc/3424': Operation not permitted
chown: changing group of `/proc/3425/task/3425': Operation not permitted
chown: changing group of `/proc/3425': Operation not permitted
chown: changing group of `/proc/3426/task/3426': Operation not permitted
chown: changing group of `/proc/3426': Operation not permitted
chown: changing group of `/proc/3427/task/3427': Operation not permitted
chown: changing group of `/proc/3427': Operation not permitted
chown: changing group of `/proc/3428/task/3428': Operation not permitted
chown: changing group of `/proc/3428': Operation not permitted
chown: changing group of `/proc/3429/task/3429': Operation not permitted
chown: changing group of `/proc/3429': Operation not permitted
chown: changing group of `/proc/3430/task/3430': Operation not permitted
chown: changing group of `/proc/3430': Operation not permitted
chown: changing group of `/proc/3431/task/3431': Operation not permitted
chown: changing group of `/proc/3431': Operation not permitted
chown: changing group of `/proc/3432/task/3432': Operation not permitted
chown: changing group of `/proc/3432': Operation not permitted
chown: changing group of `/proc/3433/task/3433': Operation not permitted
chown: changing group of `/proc/3433': Operation not permitted
chown: changing group of `/proc/3434/task/3434': Operation not permitted
chown: changing group of `/proc/3434': Operation not permitted
chown: changing group of `/proc/3435/task/3435': Operation not permitted
chown: changing group of `/proc/3435': Operation not permitted
chown: changing group of `/proc/3436/task/3436': Operation not permitted
chown: changing group of `/proc/3436': Operation not permitted
chown: changing group of `/proc/3437/task/3437': Operation not permitted
chown: changing group of `/proc/3437': Operation not permitted
chown: changing group of `/proc/3448/task/3448': Operation not permitted
chown: changing group of `/proc/3448': Operation not permitted
chown: changing group of `/proc/3462/task/3462': Operation not permitted
chown: changing group of `/proc/3462': Operation not permitted
chown: changing group of `/proc/3465/task/3465': Operation not permitted
chown: changing group of `/proc/3465': Operation not permitted
chown: changing group of `/proc/3466/task/3466': Operation not permitted
chown: changing group of `/proc/3466': Operation not permitted
chown: changing group of `/proc/3467/task/3467': Operation not permitted
chown: changing group of `/proc/3467': Operation not permitted
chown: changing group of `/proc/3468/task/3468': Operation not permitted
chown: changing group of `/proc/3468': Operation not permitted
chown: changing group of `/proc/3469/task/3469': Operation not permitted
chown: changing group of `/proc/3469': Operation not permitted
chown: changing group of `/proc/3485/task/3485': Operation not permitted
chown: changing group of `/proc/3485/task/3499': Operation not permitted
chown: changing group of `/proc/3485': Operation not permitted
chown: changing group of `/proc/3534/task/3534': Operation not permitted
chown: changing group of `/proc/3534': Operation not permitted
chown: changing group of `/proc/3535/task/3535': Operation not permitted
chown: changing group of `/proc/3535': Operation not permitted
chown: changing group of `/proc/3536/task/3536': Operation not permitted
chown: changing group of `/proc/3536': Operation not permitted
chown: changing group of `/proc/3603/task/3603': Operation not permitted
chown: changing group of `/proc/3603': Operation not permitted
chown: changing group of `/proc/3606/task/3606': Operation not permitted
chown: changing group of `/proc/3606': Operation not permitted
chown: changing group of `/proc/3607/task/3607': Operation not permitted
chown: changing group of `/proc/3607': Operation not permitted
chown: changing group of `/proc/3608/task/3608': Operation not permitted
chown: changing group of `/proc/3608': Operation not permitted
chown: changing group of `/proc/3609/task/3609': Operation not permitted
chown: changing group of `/proc/3609': Operation not permitted
chown: changing group of `/proc/3610/task/3610': Operation not permitted
chown: changing group of `/proc/3610': Operation not permitted
chown: changing group of `/proc/3611/task/3611': Operation not permitted
chown: changing group of `/proc/3611': Operation not permitted
chown: changing group of `/proc/3612/task/3612': Operation not permitted
chown: changing group of `/proc/3612': Operation not permitted
chown: changing group of `/proc/3613/task/3613': Operation not permitted
chown: changing group of `/proc/3613': Operation not permitted
chown: changing group of `/proc/3614/task/3614': Operation not permitted
chown: changing group of `/proc/3614': Operation not permitted
chown: changing group of `/proc/3615/task/3615': Operation not permitted
chown: changing group of `/proc/3615': Operation not permitted
chown: changing group of `/proc/3616/task/3616': Operation not permitted
chown: changing group of `/proc/3616': Operation not permitted
chown: changing group of `/proc/3617/task/3617': Operation not permitted
chown: changing group of `/proc/3617': Operation not permitted
chown: changing group of `/proc/3618/task/3618': Operation not permitted
chown: changing group of `/proc/3618': Operation not permitted
chown: changing group of `/proc/3619/task/3619': Operation not permitted
chown: changing group of `/proc/3619': Operation not permitted
chown: changing group of `/proc/3620/task/3620': Operation not permitted
chown: changing group of `/proc/3620': Operation not permitted
chown: changing group of `/proc/3621/task/3621': Operation not permitted
chown: changing group of `/proc/3621': Operation not permitted
chown: changing group of `/proc/3622/task/3622': Operation not permitted
chown: changing group of `/proc/3622': Operation not permitted
chown: changing group of `/proc/3623/task/3623': Operation not permitted
chown: changing group of `/proc/3623': Operation not permitted
chown: changing group of `/proc/3624/task/3624': Operation not permitted
chown: changing group of `/proc/3624': Operation not permitted
chown: changing group of `/proc/3625/task/3625': Operation not permitted
chown: changing group of `/proc/3625': Operation not permitted
chown: changing group of `/proc/3626/task/3626': Operation not permitted
chown: changing group of `/proc/3626': Operation not permitted
chown: changing group of `/proc/3627/task/3627': Operation not permitted
chown: changing group of `/proc/3627': Operation not permitted
chown: changing group of `/proc/3628/task/3628': Operation not permitted
chown: changing group of `/proc/3628': Operation not permitted
chown: changing group of `/proc/3629/task/3629': Operation not permitted
chown: changing group of `/proc/3629': Operation not permitted
chown: changing group of `/proc/3630/task/3630': Operation not permitted
chown: changing group of `/proc/3630': Operation not permitted
chown: changing group of `/proc/3631/task/3631': Operation not permitted
chown: changing group of `/proc/3631': Operation not permitted
chown: changing group of `/proc/3632/task/3632': Operation not permitted
chown: changing group of `/proc/3632': Operation not permitted
chown: changing group of `/proc/3633/task/3633': Operation not permitted
chown: changing group of `/proc/3633': Operation not permitted
chown: changing group of `/proc/3634/task/3634': Operation not permitted
chown: changing group of `/proc/3634': Operation not permitted
chown: changing group of `/proc/3635/task/3635': Operation not permitted
chown: changing group of `/proc/3635': Operation not permitted
chown: changing group of `/proc/3636/task/3636': Operation not permitted
chown: changing group of `/proc/3636': Operation not permitted
chown: changing group of `/proc/3637/task/3637': Operation not permitted
chown: changing group of `/proc/3637': Operation not permitted
chown: changing group of `/proc/3638/task/3638': Operation not permitted
chown: changing group of `/proc/3638': Operation not permitted
chown: changing group of `/proc/3639/task/3639': Operation not permitted
chown: changing group of `/proc/3639': Operation not permitted
chown: changing group of `/proc/3640/task/3640': Operation not permitted
chown: changing group of `/proc/3640': Operation not permitted
chown: changing group of `/proc/3641/task/3641': Operation not permitted
chown: changing group of `/proc/3641': Operation not permitted
chown: changing group of `/proc/3642/task/3642': Operation not permitted
chown: changing group of `/proc/3642': Operation not permitted
chown: changing group of `/proc/3643/task/3643': Operation not permitted
chown: changing group of `/proc/3643': Operation not permitted
chown: changing group of `/proc/3644/task/3644': Operation not permitted
chown: changing group of `/proc/3644': Operation not permitted
chown: changing group of `/proc/3645/task/3645': Operation not permitted
chown: changing group of `/proc/3645': Operation not permitted
chown: changing group of `/proc/3973/task/3973': Operation not permitted
chown: changing group of `/proc/3973': Operation not permitted
chown: changing group of `/proc/3974/task/3974/fd/4': No such file or directory
chown: changing group of `/proc/3974/task/3974': Operation not permitted
chown: changing group of `/proc/3974/fd/4': No such file or directory
chown: changing group of `/proc/3974': Operation not permitted
chown: changing group of `/proc/26054/task/26054': Operation not permitted
chown: changing group of `/proc/26054': Operation not permitted
chown: changing group of `/proc/26056/task/26056': Operation not permitted
chown: changing group of `/proc/26056': Operation not permitted
chown: changing group of `/proc/28332/task/28332': Operation not permitted
chown: changing group of `/proc/28332': Operation not permitted
chown: changing group of `/proc/28335/task/28335': Operation not permitted
chown: changing group of `/proc/28335': Operation not permitted
chown: changing group of `/proc/28615/task/28615': Operation not permitted
chown: changing group of `/proc/28615': Operation not permitted
chown: changing group of `/proc/28903/task/28903': Operation not permitted
chown: changing group of `/proc/28903': Operation not permitted
chown: changing group of `/proc/30168/task/30168': Operation not permitted
chown: changing group of `/proc/30168': Operation not permitted
chown: changing group of `/proc/30931/task/30931': Operation not permitted
chown: changing group of `/proc/30931': Operation not permitted

I checked dialparties.agi after this and it was still unaffected
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#17
My apologioes for not being explicit, you need to replace the variables, (the bits starting with $ ) to make it work.

From the freepbx_engine script

# Set some defaults which can be re-defined in amportal.conf
AMPDEVUSER=asterisk
AMPDEVGROUP=asterisk
AMPASTERISKUSER=asterisk
AMPASTERISKGROUP=asterisk
AMPASTERISKWEBUSER=$AMPASTERISKUSER
AMPASTERISKWEBGROUP=$AMPASTERISKGROUP
AMPVMUMASK=077
ASTETCDIR=/etc/asterisk


and by default in /etc/amportal.conf

$ASTVARLIBDIR
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,886
Members
17,563
Latest member
dineshr
Top