Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Error opening file for reading: Permission denied


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
mitch_ml at claborn.net
Guest





PostPosted: Mon Aug 18, 2014 12:14 pm    Post subject: [asterisk-users] Error opening file for reading: Permission Reply with quote

Asterisk 12.4

I am seeing message "Error opening file for reading: Permission denied"
several times during the asterisk startup (asterisk -cvvvvv) 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
Back to top
paul at greenberg.pro
Guest





PostPosted: Mon Aug 18, 2014 2:29 pm    Post subject: [asterisk-users] Error opening file for reading: Permission Reply with quote

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-bounces@lists.digium.com <asterisk-users-bounces@lists.digium.com> on behalf of Mitch Claborn <mitch_ml@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 -cvvvvv) 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
Back to top
mitch_ml at claborn.net
Guest





PostPosted: Tue Aug 19, 2014 11:36 am    Post subject: [asterisk-users] Error opening file for reading: Permission Reply with quote

No, that's not it. The wording is different.

Mitch




On 08/18/2014 02:28 PM, Paul Greenberg wrote:
Quote:
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-bounces@lists.digium.com <asterisk-users-bounces@lists.digium.com> on behalf of Mitch Claborn <mitch_ml@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 -cvvvvv) 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
Back to top
mjordan at digium.com
Guest





PostPosted: Tue Aug 19, 2014 2:33 pm    Post subject: [asterisk-users] Error opening file for reading: Permission Reply with quote

On Tue, Aug 19, 2014 at 11:36 AM, Mitch Claborn <mitch_ml@claborn.net> wrote:
Quote:
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
Back to top
mitch_ml at claborn.net
Guest





PostPosted: Tue Aug 19, 2014 2:49 pm    Post subject: [asterisk-users] Error opening file for reading: Permission Reply with quote

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:
Quote:
On Tue, Aug 19, 2014 at 11:36 AM, Mitch Claborn <mitch_ml@claborn.net> wrote:
Quote:
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
Back to top
asterisk.org at sedwar...
Guest





PostPosted: Tue Aug 19, 2014 3:39 pm    Post subject: [asterisk-users] Error opening file for reading: Permission Reply with quote

Quote:
Quote:
On Tue, Aug 19, 2014 at 11:36 AM, Mitch Claborn <mitch_ml@claborn.net>

Quote:
Quote:
Quote:
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 sedwards@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
Back to top
mitch_ml at claborn.net
Guest





PostPosted: Tue Aug 19, 2014 4:54 pm    Post subject: [asterisk-users] Error opening file for reading: Permission Reply with quote

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:
Quote:
Quote:
Quote:
On Tue, Aug 19, 2014 at 11:36 AM, Mitch Claborn <mitch_ml@claborn.net>

Quote:
Quote:
Quote:
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services