Failed to copy from module agi-bin

Hello All,

I just installed the latest version of freepbx 2.4 and everything seem to be fine except that i’m getting a error message on status page

Retrieve conf failed to copy file(s) from a module’s agi-bin dir: chmod(): Operation not permitted
chmod(): Operation not permitted

Added 8 minutes ago
(retrieve_conf.CPAGIBIN)

Any ideas??

no one huh?

Huh

you probably have permission or ownership problems in some of the agi-bin scripts that FreePBX copies from the modules each time you press the Apply Configurations bar.

files are all owned by asterisk…does this cause problem or is just a message

it will fail to copy if there is an existing file that is write protected. It does not force the copy, in case you meant to write protect it.

Hmmm not sure what you mean?? All files are owned and Read-Write for asterisk… What should I do then??

so what are the permission for this suppose to be??

delete the file, make sure the directory is owned by asterisk with the x bit set, and then press Apply Configuration Settings to get it re-copied. That should do it.

cool!! that did it…what do know about this error
Could not reload the FOP operator panel server using the bounce_op.sh script. Configuration changes may not be reflected in the panel display.
Added 1 minute ago
(freepbx.reload_fop)

hi,
had a similar problem, i guess. install of freepbx 2.40 on ubuntu 7.10 and apache default user and group (www-data). added asterisk-user to www-data group, but got the error-message of chmod errors. (i updated everthing to today recent versions, error stayed)

i looked into /usr/share/asterisk/agi-bin and got files with a user:group of www-data:asterisk and permission of 740 (rwx r-- —).
the original files in /var/www/admin/modules/core/agi-bin had user:group of www-data:www-data and permission of 755 (rwxr-xr-x)

i wanted to stay with apache-defaults of user and group www-data:www-data,
so i went into /var/lib/asterisk/bin and changed in retrieve_conf the chmod permission where it says “chmod($targetfile,0754);” to “chmod($targetfile,0774);”.
now no error occurs anymore.

did i miss anything important, or is this the trick to stay with apache-defaults?

regards,
ozett

I am using version 2400 I too am getting the error now. I believe it is preventing ZAPTEl from starting up.

Retrieve conf failed to copy file(s) from a module’s agi-bin dir: copy(/var/lib/asterisk/agi-bin/checksound.agi) [function.copy]: failed to open stream: Permission denied
copy(/var/lib/asterisk/agi-bin/directory) [function.copy]: failed to open stream: Permission denied
copy(/var/lib/asterisk/agi-bin/recordingcheck) [function.copy]: failed to open stream: Permission denied
copy(/var/lib/asterisk/agi-bin/fixlocalprefix) [function.copy]: failed to open stream: Permission denied
copy(/var/lib/asterisk/agi-bin/list-item-remove.php) [function.copy]: failed to open stream: Permission denied
copy(/var/lib/asterisk/agi-bin/enumlookup.agi) [function.copy]: failed to open stream: Permission denied
copy(/var/lib/asterisk/agi-bin/dialparties.agi) [function.copy]: failed to open stream: Permission denied
copy(/var/lib/asterisk/agi-bin/user_login_out.agi) [function.copy]: failed to open stream: Permission denied

These are the current permissions of my files
http://clip.drlinky.com/255978

make sure apache is running as asterisk or group inclusion is set properly. Looks like the files that are getting denied have world read access only, which would result in this. In any event, this won’t keep zapel from starting, it simply reports that it could not copy the specified file and continues running. Zaptel gets loaded before Asterisk even starts.

I do not understand with the solution, p_lindheime

I am using AsteriskNow1.5 which is FreePBX2.5.1.2 CentOS5.3

I do face the problem of permission and I have this notice message below:

Retrieve conf failed to copy file(s) from a module’s agi-bin dir:
chmod(): Operation not permitted
chmod(): Operation not permitted
chmod(): Operation not permitted
chmod(): Operation not permitted
chmod(): Operation not permitted
chmod(): Operation not permitted
chmod(): Operation not permitted
chmod(): Operation not permitted

Can you please help? Thank you

I had this problem too on the same thing. apache was running as apache. I changed it to asterisk in /etc/httpd/conf/httpd.conf and all seems well now.

I have not seen this on other installs of AsteriskNOW. I installed and did yum upgrade before applying changes and such for FreePBX. I am assuming the conf files got jumbled. I normally install - upgrade all FreePBX modules, Then yum update. I will test again and report back.

I am install FreePBX on Debian 5.0 and have same problem too
chmod(): Operation not permitted
chmod(): Operation not permitted
chmod(): Operation not permitted

Can you help me where is in debian ?

have a look at

/etc/apache2/envvars

Experienced this same issue in AsteriskNOW 1.5/FreePBX 2.6
Editing httpd.conf to have Apache run as User\Group ‘asterisk’ as opposed to ‘apache’ seems to have done the trick for me as well in resolving the issue with “Failed to copy from module agi-bin”

Guess the question now is whether this impacts anything else. I still have the message “Could not reload FOP server to deal with”

Changing apache to run as asterisk fixed all my problems too.
But there is a side effect. You might not be able to upgrade modules since file ownership is all mixed up (some apache some asterisk).
To fix that do this:
After you change apache to run as asterisk (edit /etc/httpd/conf/httpd.conf and change User/Group to asterisk then run ‘service httpd restart’) you should also run these commands (as root):
cd /var/www/html
chown -R asterisk:asterisk *
And everything should work.