SOLVED New install on ubuntu and permission errors...

Sean Hogan

Member
Joined
Feb 10, 2015
Messages
34
Reaction score
0
I reinstalled it, and did not install CSF.

I don't see any permissions errors.
 

Sean Hogan

Member
Joined
Feb 10, 2015
Messages
34
Reaction score
0
Now that it's installed and working, how do I 1) enable the operator panel and 2) enable caller ID trifecta the link is gone
 

Sean Hogan

Member
Joined
Feb 10, 2015
Messages
34
Reaction score
0
After I logged in this morning Ubuntu updated with the script and the permission problems are back
Fresh install, nothing added.



Output of update attached
 

Attachments

  • ubuntuAutoUpdate.txt
    33 KB · Views: 4

howardsl2

Guru
Joined
Aug 5, 2013
Messages
88
Reaction score
25
I understand that you have issues with PIAF on Ubuntu. If you want to try an alternative, see my PIAF 2 tutorial for CentOS. It has been tested and the install process should only take an hour or so.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,227
Try this:

Code:
chown -R asterisk:asterisk /etc/asterisk
chown -R asterisk:asterisk /var/lib/asterisk
chown -R asterisk:asterisk /var/www/html
amportal restart
 

Sean Hogan

Member
Joined
Feb 10, 2015
Messages
34
Reaction score
0
root@pbx2:~# chown -R asterisk:asterisk /etc/asterisk
chown: changing ownership of ‘/etc/asterisk/manager.conf.bak’: Operation not permitted
chown: changing ownership of ‘/etc/asterisk/manager_custom.conf’: Operation not permitted
chown: changing ownership of ‘/etc/asterisk/manager_additional.conf’: Operation not permitted
chown: changing ownership of ‘/etc/asterisk/manager.conf’: Operation not permitted
root@pbx2:~# chown -R asterisk:asterisk /var/lib/asterisk
root@pbx2:~# chown -R asterisk:asterisk /var/www/html
root@pbx2:~# amportal restart
 

Sean Hogan

Member
Joined
Feb 10, 2015
Messages
34
Reaction score
0
root@pbx2:~# amportal restart
Please wait...
STOPPING ASTERISK
Waiting for Asterisk to Stop Gracefully...
All calls will be dropped once the timer hits 0. To cancel, press CTL-C
Waiting for Asterisk to Stop
Force stopping Asterisk and hanging up active channels
Waiting for Asterisk to Stop
Asterisk has still not stopped, killing Asterisk processes
safe_asterisk: no process found
Asterisk Stopped
SETTING FILE PERMISSIONS
chown: changing ownership of ‘/etc/asterisk/manager.conf.bak’: Operation not permitted
chown: changing ownership of ‘/etc/asterisk/manager_custom.conf’: Operation not permitted
chown: changing ownership of ‘/etc/asterisk/manager_additional.conf’: Operation not permitted
chown: changing ownership of ‘/etc/asterisk/manager.conf’: Operation not permitted
chmod: changing permissions of ‘/etc/asterisk/manager.conf.bak’: Operation not permitted
chmod: changing permissions of ‘/etc/asterisk/manager_custom.conf’: Operation not permitted
chmod: changing permissions of ‘/etc/asterisk/manager_additional.conf’: Operation not permitted
chmod: changing permissions of ‘/etc/asterisk/manager.conf’: Operation not permitted
chattr: Operation not supported while reading flags on /var/www/html/cxpanel
chattr: Operation not supported while reading flags on /var/www/html/provisioning
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
STARTING ASTERISK
Asterisk Started
root@pbx2:~#
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
try this:
chattr -i /etc/asterisk/manager.conf
chown asterisk.asterisk /etc/asterisk/manager.conf.

and report any errors
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
also separately run this:
lsattr /etc/asterisk/manager.conf

and report the response.
 

Sean Hogan

Member
Joined
Feb 10, 2015
Messages
34
Reaction score
0
try this:
chattr -i /etc/asterisk/manager.conf
chown asterisk.asterisk /etc/asterisk/manager.conf.

and report any errors



root@pbx2:~# chattr -i /etc/asterisk/manager.conf
root@pbx2:~# chown asterisk.asterisk /etc/asterisk/manager.conf
root@pbx2:~#
No more errors.
All I changed was added IP FQDN to /etc/hosts and whitelisted Cloudflare (my DNS provider)
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
ok it looks like somewhere along the lines the "immutible" flag was enabled for those files you are getting errors on.
the flag needs to be removed as that prevents even root from modifying a file.
run this:
chattr -R -i /etc/asterisk
and then retry the asterisk reload.
 

Sean Hogan

Member
Joined
Feb 10, 2015
Messages
34
Reaction score
0
ok it looks like somewhere along the lines the "immutible" flag was enabled for those files you are getting errors on.
the flag needs to be removed as that prevents even root from modifying a file.
run this:
chattr -R -i /etc/asterisk
and then retry the asterisk reload.



root@pbx2:~# chattr -R -i /etc/asterisk
chattr: Operation not supported while reading flags on /etc/asterisk/sip_notify_endpointman.conf
chattr: Operation not supported while reading flags on /etc/asterisk/logger.conf
chattr: Operation not supported while reading flags on /etc/asterisk/rtp.conf
chattr: Operation not supported while reading flags on /etc/asterisk/cel_odbc.conf
chattr: Operation not supported while reading flags on /etc/asterisk/udptl.conf
chattr: Operation not supported while reading flags on /etc/asterisk/extensions.conf
chattr: Operation not supported while reading flags on /etc/asterisk/ccss.conf
chattr: Operation not supported while reading flags on /etc/asterisk/iax.conf
chattr: Operation not supported while reading flags on /etc/asterisk/cel.conf
chattr: Operation not supported while reading flags on /etc/asterisk/sip.conf
chattr: Operation not supported while reading flags on /etc/asterisk/res_odbc.conf
chattr: Operation not supported while reading flags on /etc/asterisk/confbridge.conf
chattr: Operation not supported while reading flags on /etc/asterisk/sip_notify.conf
chattr: Operation not supported while reading flags on /etc/asterisk/features.conf
chattr: Operation not supported while reading flags on /etc/asterisk/res_digium_phone.conf
chattr: Operation not supported while reading flags on /etc/asterisk/http.conf
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,227
FYI: The immutable flag was set on some files including manager.conf because of concerns that a reported FreePBX vulnerability was potentially exposing critical system files to manipulation by individuals that surreptitiously gained asterisk user access to servers via the FreePBX GUI. With asterisk user permissions and no firewall in place, it's incredibly easy to modify manager.conf to authorize complete control of and remote access to an Asterisk server. By removing that protection, you're obviously electing to go-it-alone.

See the PIAF RSS Feed in the web GUI for details and links to the vulnerabilities:

B-TH8omIUAAiJ1B.jpg:large
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
Those files are probably locked open for read/write, I wouldn't worry about it. none of them were on the "trouble" list.
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
FYI: The immutable flag was set on some files including manager.conf because of concerns that a reported FreePBX vulnerability was potentially exposing critical system files to manipulation by individuals that surreptitiously gained asterisk user access to servers via the FreePBX GUI. With asterisk user permissions and no firewall in place, it's incredibly easy to modify manager.conf to authorize complete control of and remote access to an Asterisk server.


But.. that would make it difficult to make legitimate changes to the conf files. maybe a lock/unlock script would be the best solution?
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,227
But.. that would make it difficult to make legitimate changes to the conf files. maybe a lock/unlock script would be the best solution?


Not hard actually...
Code:
lsattr /etc/asterisk
chattr -i /etc/asterisk/manager.conf
# make changes desired
chattr +i /etc/asterisk/manager.conf
amportal restart
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
wait.. when was that change made? my PBX (piaf verison 11.10) does not have any immutable flags set.
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
Not hard actually...
Code:
chattr -i /etc/asterisk/manager.conf
# make changes desired
chattr +i /etc/asterisk/manager.conf
amportal restart

Right... I meant hard to those who don't know what an immutable flag is or how to change one. obviously those reading this thread do know now.
 

Members online

Forum statistics

Threads
25,824
Messages
167,826
Members
19,249
Latest member
jetest
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