Say, When * reloads it changes the file permissions of below file. How can I call an executable which corrects for this? chmod 777 /var/lib/asterisk/agi-bin/dialparties.agi Tx Shaun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110803/90fe6641/attachment.htm>
Just use a system() call. From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Shaun Wingrin Sent: Wednesday, August 03, 2011 2:28 AM To: asterisk-users at lists.digium.com Subject: [asterisk-users] Asterisk reload, to execute file Say, When * reloads it changes the file permissions of below file. How can I call an executable which corrects for this? chmod 777 /var/lib/asterisk/agi-bin/dialparties.agi Tx Shaun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110803/2eb7faf5/attachment.htm>
On Wed, 3 Aug 2011, Shaun Wingrin wrote:> When * reloads it changes the file permissions of below file.Asterisk doesn't change file permissions. Maybe your startup script does?> How can I call an executable which corrects for this?You should treat the cause, not the symptom.> chmod 777 /var/lib/asterisk/agi-bin/dialparties.agiThis is a bad idea. Do you really want anybody to be able to delete or modify this file? What would happen if I were to replace this file with one containing 'rm --force --recursive /' and then call in? '777' says 'I really don't know what I'm doing and I'm too lazy to try to figure it out.' Guess how many files have '777' on any freshly installed OS? -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000