Topic: Files with wrong permissions resulting in Dead Air on Calls [Comments: 6]
k3leland

Sat, 08/21/2010 - 15:42 | Files with wrong permissions resulting in Dead Air on Calls

When I create a new tenant the sample open and closed messages created with the tenant have bad permissions:

[k3leland@hpbx0 ~]$ ls -l /var/astsound/sounds/ogm/test/*
-rwx------ 1 root root 29822 Aug 21 18:40 /var/astsound/sounds/ogm/test/sampleclosed.wav
-rwx------ 1 root root 98942 Aug 21 18:40 /var/astsound/sounds/ogm/test/sampleopen.wav

An asterisk installation running as user:group asterisk:asterisk cannot read these files.

PBX Manager 6.1.1.2

eeman

Sun, 08/22/2010 - 03:44 | to correct this you need to

to correct this you need to correct all the sampleclosed.wav files, such as the ones you clone. your file permissions are all wrong. try this

find /var/astsound/sounds/ogm -name "*.wav" -exec chmod 644 {} \;

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

k3leland

Sun, 08/22/2010 - 20:44 | What you describe eeman is

What you describe eeman is how to manually repair the broken permissions. However, this process would need to be repeated every time a new tenant is created.

------- Initial State
[root@hpbx0 ogm]# pwd
/var/astsound/sounds/ogm

[root@hpbx0 ogm]# ls -al .
total 48
drwxr-xr-x 12 asterisk asterisk 4096 Aug 22 16:31 .
drwxr-sr-x 5 asterisk asterisk 4096 Jul 30 11:55 ..

[root@hpbx0 ogm]# ls -l test
ls: test: No such file or directory

-------- Steps to reproduce

Log in as admin
Click on Tenant Creation
Create a Tenant named test

-------- Post State

[root@hpbx0 ogm]# pwd
/var/astsound/sounds/ogm

[root@hpbx0 ogm]# ls -al .
total 48
drwxr-xr-x 12 asterisk asterisk 4096 Aug 22 16:31 .
drwxr-sr-x 5 asterisk asterisk 4096 Jul 30 11:55 ..

[root@hpbx0 ogm]# ls -la test
total 144
drwxr-xr-x 2 asterisk asterisk 4096 Aug 22 16:31 .
drwxr-xr-x 12 asterisk asterisk 4096 Aug 22 16:31 ..
-rwx------ 1 root root 29822 Aug 22 16:31 sampleclosed.wav
-rwx------ 1 root root 98942 Aug 22 16:31 sampleopen.wav

eeman

Sun, 08/22/2010 - 21:30 | My install does not do that.

My install does not do that. Perhaps because you butchered your sounds directory?

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com

thirdlane

Mon, 08/23/2010 - 02:42 | incorrect permissions

One of the recent versions of PBX Manager had permissions set incorrectly which resulted in wrong permissions being copied from the original tenant every time a new tenant was created. Were you cloning an existing tenant when creating "test"?

If I understand this correctly, Erik's suggestion is supposed to fix this for all existing tenants. We are adding code in the installer to fix permissions for the existing installations that were affected by this problem. It will be available in the upcoming version. In the meantime please follow Erik's suggestion.

Alex Epshteyn
Third Lane Technologies
Multi-tenant Asterisk PBX

k3leland

Mon, 08/23/2010 - 12:40 | Yes, for "Use existing tenant

Yes, for "Use existing tenant as a prototype" I have selected " Prototype tenant (can be used for cloning)"
If I select None there I do not get the any files in /var/astsound/sounds/ogm/test.

eeman

Mon, 08/23/2010 - 14:41 | for starters these are audio

for starters these are audio files, an executable bit is just totally wrong. Secondly the use of SETUID should be avoided. run the find command I gave you to fix up all the audio files in your ogm directory structure. Then see if making your test tenant repeats the problem.

Erik Smith
CTO
BluegrassNet Voice
dCAP
Thirdlane Support by BluegrassNet Voice
eeman at bluegrassnetvoice dot com