ALERT Voicemails saving with root permissions

balefireeyed

Member
Joined
Sep 5, 2013
Messages
53
Reaction score
3
qqqqqqqqqqqqqqqqqqSYSTEM INFORMATION *VERIFIED*qqqqqqqqqqqqqqqqqqqqqk
x Asterisk = ONLINE | Dahdi = ONLINE | MySQL = ONLINE x
x SSH = ONLINE | Apache = ONLINE | Iptables = ONLINE x
x Fail2ban = ONLINE | Internet = ONLINE | Ip6Tables = OFFLINE x
x Disk Free = ADEQUATE| Mem Free = ADEQUATE| NTPD = ONLINE x
x SendMail = ONLINE | Samba = OFFLINE | Webmin = ONLINE x
x Ethernet0 = ONLINE | Ethernet1 = N/A | Wlan0 = N/A x
x x
x PIAF Installed Version = 2.0.6.2 under *HARDWARE* x
x FreePBX Version = 2.10.1.16 x
x 2.10 x
x Running Asterisk Version = 1.8.13.0 x
x Asterisk Source Version = 1.8.13.0 x
x Dahdi Source Version = 2.6.1+2.6.1 x
x Libpri Source Version = 1.4.12 x
x IP Address = 192.168.20.254 on eth0 x
x Operating System = CentOS release 6.2 (Final) x
x Kernel Version = 2.6.32-220.17.1.el6.i686 - 32 Bit
One system has started saving voicemails as root:root in INBOX. Even when it wasn't doing that, it started to re-save emails to the Old folder as root:root. Due to this, *97 wouldn't let those users listen to emails until I went in and chown asterisk:asterisk on those directories. The higher level directories to those, for example /var/spool/asterisk/voicemail or /var/spool/asterisk/voicemail/default/ext are all set with asterisk:asterisk perms.
Temporarily, I've set a crontab as such:
Code:
*/5 * * * * root chown -R asterisk:asterisk /var/spool/asterisk/voicemail/default/ext#/INBOX/*.*
*/5 * * * * root chown -R asterisk:asterisk /var/spool/asterisk/voicemail/default/ext#/INBOX/*.*
*/5 * * * * root chown -R asterisk:asterisk /var/spool/asterisk/voicemail/default/ext#/Old/*.*
*/5 * * * * root chown -R asterisk:asterisk /var/spool/asterisk/voicemail/default/ext#/Old/*.*
Anyone have a guess as to why this is happening?
 

balefireeyed

Member
Joined
Sep 5, 2013
Messages
53
Reaction score
3
Yeah, I ran top and I see that asterisk is running as root.

I always run amportal; I did a history |grep amportal and a history |grep service asterisk from several consecutively opened shell prompts and I only see amportal restart, no service asterisk restart, though I can't promise that nobody else has run the latter command, I wasn't able to find it. Perhaps it was run from the console... any other reason that might have happened? So I'll run an amportal restart after hours and update this to let you guys know that it's worked. Thanks so much!
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
You need to get that server a million miles away from the Internet until you can stop running Asterisk as root. :eek:
 

balefireeyed

Member
Joined
Sep 5, 2013
Messages
53
Reaction score
3
Read you loud and clear, Ward. Thank you both, the issue is cleared up, I've made sure that my other system isn't dong this, and a nice forewarning to anyone who happens up this issue or has an admin who thinks he or she is clever by restarting asterisk in an incorrect manner!
 

Members online

No members online now.

Forum statistics

Threads
25,780
Messages
167,506
Members
19,199
Latest member
leocipriano
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top