Re: [asterisk-users] Error opening file for reading: Permission denied
No, that's not it. The wording is different. Mitch On 08/18/2014 02:28 PM, Paul Greenberg wrote: Mitch, Is it the below error? if ((fd = open(filename, O_RDONLY)) 0) { ast_log(LOG_WARNING, Cannot open file '%s' for reading: %s\n, filename, strerror(errno)); return NULL; } Regards, Paul From: asterisk-users-boun...@lists.digium.com asterisk-users-boun...@lists.digium.com on behalf of Mitch Claborn mitch...@claborn.net Sent: Monday, August 18, 2014 1:14 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Error opening file for reading: Permission denied Asterisk 12.4 I am seeing message Error opening file for reading: Permission denied several times during the asterisk startup (asterisk -cv) but it doesn't say which file. Is there a way to find out which file is having trouble? -- Mitch -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Error opening file for reading: Permission denied
On Tue, Aug 19, 2014 at 11:36 AM, Mitch Claborn mitch...@claborn.net wrote: No, that's not it. The wording is different. grep doesn't turn up your phrase: ~/projects/12$ grep --include=*.c --include=*.h -r Error opening file . ~/projects/12$ Are you using any 3rd party modules that aren't delivered with Asterisk? -- Matthew Jordan Digium, Inc. | Engineering Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com http://asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Error opening file for reading: Permission denied
I tried grep too. No 3rd party modules - this is an out-of-the box download and build. I'm guessing that some library function is being called to read a file and the error is happening there? Mitch On 08/19/2014 02:33 PM, Matthew Jordan wrote: On Tue, Aug 19, 2014 at 11:36 AM, Mitch Claborn mitch...@claborn.net wrote: No, that's not it. The wording is different. grep doesn't turn up your phrase: ~/projects/12$ grep --include=*.c --include=*.h -r Error opening file . ~/projects/12$ Are you using any 3rd party modules that aren't delivered with Asterisk? -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Error opening file for reading: Permission denied
On Tue, Aug 19, 2014 at 11:36 AM, Mitch Claborn mitch...@claborn.net No, that's not it. The wording is different. Can you run Asterisk via strace? Something like: sudo -u asterisk strace /usr/sbin/asterisk -c -p -U asterisk -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Error opening file for reading: Permission denied
Grepping the output of the strace revealed this: stat(/root/.terminfo, 0x7fff8622ed50) = -1 EACCES (Permission denied) open(/root/.asterisk_history, O_RDONLY) = -1 EACCES (Permission denied) open(/root/.odbcinst.ini, O_RDONLY) = -1 EACCES (Permission denied) [this one many times] That must be because I'm starting asterisk as root. When I su to asterisk first, then start it, those above disappear. Problem solved! Thanks Steve! Mitch On 08/19/2014 03:39 PM, Steve Edwards wrote: On Tue, Aug 19, 2014 at 11:36 AM, Mitch Claborn mitch...@claborn.net No, that's not it. The wording is different. Can you run Asterisk via strace? Something like: sudo -u asterisk strace /usr/sbin/asterisk -c -p -U asterisk -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Error opening file for reading: Permission denied
Asterisk 12.4 I am seeing message Error opening file for reading: Permission denied several times during the asterisk startup (asterisk -cv) but it doesn't say which file. Is there a way to find out which file is having trouble? -- Mitch -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Error opening file for reading: Permission denied
Mitch, Is it the below error? if ((fd = open(filename, O_RDONLY)) 0) { ast_log(LOG_WARNING, Cannot open file '%s' for reading: %s\n, filename, strerror(errno)); return NULL; } Regards, Paul From: asterisk-users-boun...@lists.digium.com asterisk-users-boun...@lists.digium.com on behalf of Mitch Claborn mitch...@claborn.net Sent: Monday, August 18, 2014 1:14 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Error opening file for reading: Permission denied Asterisk 12.4 I am seeing message Error opening file for reading: Permission denied several times during the asterisk startup (asterisk -cv) but it doesn't say which file. Is there a way to find out which file is having trouble? -- Mitch -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users