Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Wed Apr 24, 2024 6:50 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Problems with root user
PostPosted: Mon Aug 11, 2008 9:04 am 
Offline

Joined: Mon Aug 11, 2008 8:51 am
Posts: 5
Hey all!

I've just finished installing A2Billing on my Asterisk server, I go to my
login page .../A2Billing_UI and use the default user/password to login. It
logs me in sucessfully but when I go to use any of the tools (Add
Administrators, Callback, Trunks) it says "Access Denied" can you please
give me more information on how to edit these permissions via SQL?

System Specs:
CentOS 4
MySQL 5
PHP 5
Asterisk2Billing - Version 1.3.3 (Doudou08)

Regards,
Andrew
Multi3VoIP


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 11, 2008 9:29 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

What do your apache and PHP logs say?

On centos 5 with recent yum updates, this problem has reared its head:-

http://www.freepbx.org/trac/ticket/2472

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 11, 2008 9:50 am 
Offline

Joined: Mon Aug 11, 2008 8:51 am
Posts: 5
Well according to that post you gave me all I need to do is chown asterisk /var/lib/php/session/ and this may well fix it as I'm also getting a PHP Error "/var/lib/php/session/BUNCHOFRANDOMLETTERS" Permission Denied. Once the SIP server is back up I will try this.

EDIT:
Worked a treat! If anyone else has this issue simply run; chown asterisk /var/lib/php/session/

Thanks!
Andrew


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 11, 2008 3:04 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
:? This might have worked, but it is not the right thing to do unless you Apache is running as user:group 'asterisk:....'. And that is not always the case in Linux. In my case, Apache has always been running as user:group "apache:apache".

If you run applications other than asterisk that need to create PHP sessions and that run as a user other than asterisk, it will not work.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 23, 2008 4:40 am 
Offline

Joined: Sat May 10, 2008 4:19 pm
Posts: 132
Location: Wilmington, DE
Asiby is right.

I was having the same problem and was wondering why the permissions wasn't working in MySql. The owner was already asterisk. So after reading Asiby's post and looking at another machine I updated yesterday, I changed the user to root and the group to apache for "/var/lib/php/session."

It now works fine. (user=root, group=apache)

This is PIAF 1.2, CentOs 5.2.

I hope this will help someone.

RobinA.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 23, 2008 6:29 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
There is another thing among many that people should be aware of. Usually, out of the box, Asterisk runs as root. And it is mostly dangerous to run any application as root, specially daemons that interact with the outside world. The real problem starts when a malicious surfer breaks through your security. He or she will instantly have root access and will have the potential to do some damage. For each application, it is always a good idea to create a user that has no login access (using /bin/false or /sbin/nologin shell) and use that user account and group for only for running that application.

In our case, we have Asterisk, MySQL, Apache and A2B. Usually, Apache and MySQL are well configured. I personally don't like the fact that Apache would run with a user called Asterisk. It may be confusing. Parts of A2B will run as asterisk (the AGI) and other parts will run as apache (the GUI). Asterisk can run as asterisk.

Oh, I almost forgot. You may notice sometimes that the asterisk files may have been chowned to asterisk:asterisk. That does not mean that asterisk itself is running as asterisk:asterisk.

Cheers


Top
 Profile  
 
 Post subject: Apps running as root.
PostPosted: Sat Aug 23, 2008 3:13 pm 
Offline

Joined: Sat May 10, 2008 4:19 pm
Posts: 132
Location: Wilmington, DE
Thanks for you very informative input. I'll personally take not of that and make the necessary changes the best that I can. I hope other newbees are taking note.

RobinA.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 25, 2008 7:31 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi Robin

If you, or anyone else are using PiaF as a base, then update-scripts, followed by update-fixes should fix the problem for you. The problem was caused during a yum update.

Joe


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 14 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group