"not writable" message on DAHDI config page

luckman212

Guru
Joined
Jul 7, 2010
Messages
272
Reaction score
0
Hi guys. hoping someone can shed some light on this. I searched everywhere I could but came up empty on this--
how can I fix this? or does it even need fixin' ?
:confused5:

x0vQV.png


PiaF purple, ast 182-rc1, latest fpbx modules installed...
 

randy7376

Defnyddiwr Gweithredol
Joined
Sep 29, 2010
Messages
864
Reaction score
144
Verify /var/www/html/admin/modules/dahdiconfig/etc/chan_dadhi.conf has the following permissions and ownership:

-rw-rw-r-- 1 asterisk asterisk 269 Jun 28 2010 chan_dahdi.conf
I was able to replicate by setting this one file to read-only.

EDIT: At least check it, but that doesn't seem to be the issue.
 

randy7376

Defnyddiwr Gweithredol
Joined
Sep 29, 2010
Messages
864
Reaction score
144
When I changed the permissions back after I posted the above message, I still had the "not writable" error. :banghead:

A little digging in /var/log/httpd/error_log turned up this little gem that stood out (there were several errors!):

[Tue Jan 11 06:43:57 2011] [error] [client 192.168.1.2] PHP Warning: fopen(/etc/modprobe.d/dahdi.conf) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied in /var/www/html/admin/modules/dahdiconfig/functions.inc.php on line 1233, referer: http://pbx.local/admin/config.php?type=setup&display=dahdi
Let's see what's on or around line 1233 in functions.inc.php:

Code:
    /**
         * Write Modprobe
         *
         * Write all the modprob options to modprobe.conf
         */
    public function write_modprobe() {
               [COLOR=Red] $file = "/etc/modprobe.d/dahdi.conf";

[/COLOR] [COLOR=Red]                 if ( ! is_writable($file)) {
                        echo "not writable";[/COLOR]
                }

                $fh = fopen($file, 'w');

                fwrite($fh, "#******************************************#\n");
                fwrite($fh, "#* Auto-generated by FreePBX, do not edit *#\n");
                fwrite($fh, "#******************************************#\n");
It's trying to write to a file it has no access to - /etc/modprobe.d/dahdi.conf. The file exists, but is owned by user root and group root.

I've modified the permissions, as shown here...

-rw-rw-r-- 1 root asterisk 153 Jan 11 06:50 dahdi.conf
That should take care of it. I no longer have the "not writable" error.

This doesn't appear to hurt anything on my system as the file contains nothing more than the "Auto-generated by FreePBX" message above. YMMV...
 

luckman212

Guru
Joined
Jul 7, 2010
Messages
272
Reaction score
0
Thanks Randy, I did as you described but afterwards my DAHDI page got completely hosed (not sure why, resulted in a white frame w/ lots of php errors on it). What I ended up doing was "force install" the DAHDI Config module again via the Module Admin page. This got everything more or less back to normal again.
 

randy7376

Defnyddiwr Gweithredol
Joined
Sep 29, 2010
Messages
864
Reaction score
144
That's kind of weird... as long as you didn't try to modify any of the PHP code (there would be no reason to), it should have worked. I'm glad reloading the module worked out for you.
 

luckman212

Guru
Joined
Jul 7, 2010
Messages
272
Reaction score
0
Yep, I think something got hosed by the Sangoma wanpipe driver install (for the UT5x) which seems to be a bit crufty and in need of some dusting off...
 

Members online

No members online now.

Forum statistics

Threads
25,782
Messages
167,509
Members
19,202
Latest member
pbxnewguy
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