Someone asked a question elsewhere and I assembled an answer there some may find helpful when trying to plan deployments. so I will also put it here as a main topic.
From a base install of FreePBX 17 (Ubuntu 22.04 min)
# du -sh /var/
4.5G /var/
# du -sh /usr --exclude=/usr/local
4.3G /usr
# du -sh /usr/local
3.1M /usr/local
# du -sh /boot
113M /boot
~# du -sh /home
58M /home
# du -sh /
17G /
This is a pretty bare minimum system so some of these numbers will be low. I have been bitten in the posterior a few times for under-sizing, but I tend to do a lot of dev work. I would say at a minimum you probably want 80G and there will be a good deal more in /var than I have above. That will contain all of your call recordings, voicemails, some temp files, your database, etc. So that is one place I would focus capacity.
Audio Storage
Estimate average audio storage of about 536KB/minute. Size depends on codec and could generally range from 150KB/minute on the conservative side and about 923Kb/minute on the higher end.
Permissions
For permissions, this was generally derived from “fwconsole chown” Note that command is hookable and other files will ask for their own files to be changed. These are just the baseline if no other modules add on.
Summary of Files and Permissions
Path | Type | Permissions | Owner/Group | Notes |
---|---|---|---|---|
/var/lib/asterisk/moh |
rdir |
0755/0644 | asterisk/asterisk | Recursive, files lose execute bit |
/var/lib/asterisk/sounds |
rdir |
0755/0644 | asterisk/asterisk | Recursive, removes dangling symlinks |
/var/log/asterisk |
rdir |
0755/0644 | asterisk/asterisk | Recursive |
/var/spool/asterisk |
rdir |
0755/0644 | asterisk/asterisk | Recursive |
/var/www/html |
rdir |
0755/0644 | asterisk/asterisk | Recursive |
/var/lib/php/session |
rdir |
0774/0664 | asterisk/asterisk | Recursive |
/etc/amportal.conf |
file |
0660 | asterisk/asterisk | Single file |
/etc/freepbx.conf |
file |
0660 | asterisk/asterisk | Single file |
/var/run/asterisk |
rdir |
0775/0664 | asterisk/asterisk | Recursive |
/var/lib/asterisk/keys |
rdir |
0775/0664 | asterisk/asterisk | GPG directory |
/etc/asterisk |
rdir |
0775/0664 | asterisk/asterisk | Recursive |
/var/lib/asterisk/.ssh/id_rsa |
file |
0600 | asterisk/asterisk | SSH key |
/var/log/asterisk/freepbx_dbug |
file |
0664 | asterisk/asterisk | Debug log |
/var/log/asterisk/freepbx.log |
file |
0664 | asterisk/asterisk | Main log |
/etc/obdc.ini |
file |
0664 | asterisk/asterisk | ODBC config |
/var/lib/asterisk/bin |
execdir |
0775 | asterisk/asterisk | Recursive, retains execute bit |
/var/lib/asterisk/agi-bin |
execdir |
0775 | asterisk/asterisk | Recursive, retains execute bit |
/var/www/html/admin/modules/<mod>/<bin> |
execdir |
0755 | asterisk/asterisk | Per module, if exists |
/home/asterisk |
rdir |
0755/0644 | asterisk/asterisk | If exists |
/home/asterisk/.ssh |
rdir |
0700/0600 | asterisk/asterisk | If exists |
Deriving permission changes
You can get a permission snapshot
find / -exec stat -c "%n %a %U %G" {} + > permissions_snapshot.txt 2>/dev/null
run fwconsole chown
Do a second snapshot
find / -exec stat -c "%n %a %U %G" {} + > permissions_snapshot2.txt 2>/dev/null
Then compare them
diff permissions_snapshot.txt permissions_snapshot2.txt