Permissions denied when executing perl script wakeup call

hello. i am trying to set up wake up calls using asterisk 1.6. when i try the extension for wake up calls

exten => _55XXXX#,1,AGI( ; Set wake-up call
exten => _#55#,1,AGI( ; Cancel all
exten => _#55XXXX#,1,AGI( ; Cancel specific
exten => _
#55#,1,AGI( ; Check status

it gives the following errors

Executing [551130#@incoming1:1] AGI(“USTM/102@7625-0”, “”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/ Failed to execute ‘/var/lib/asterisk/agi-bin/’: Permission denied

how to solve this?

Make sure that the script has at least read and execute permissions for the user under which Asterisk is running, and also that all the directories on the path have at least execute permission. Make sure that SELinux isn’t getting in the way. I would personally advise making sure that Asterisk is running as root.

i have the same problème with a php script and i want to know if you have found a solution ? because i have verify the permission of php file and the parent’s directory and i have found nothing