Unable to Access Directory /usr/local/freeswitch/conf or /opt/freeswitch/conf

GraysonPeddie's picture

I followed the Install From Repo instructions for Ubuntu 10.04 LTS that I currently have. Then, I start FreeSWITCH using "/etc/init.d/freeswitch start" after setting FREESWITCH_ENABLED to true in /etc/default/default. FreeSWITCH is located in /opt/freeswitch, so in order for FreePBX v3 to work with FreeSWITCH, I have to move the freeswitch directory (/opt/freeswitch) to /var/local and then soft-symbolically link /opt/freeswitch to /usr/local/freeswitch.

For FreePBX-v3, I am following instructions from here:
DIY FreeSWITCH & FreePBXv3 from LiveCD (I skip down to where it says "/var/www.")

After I do that, I do:

chgrp -R www-data /usr/local/freeswitch/conf/*
chmod -R g+w /usr/local/freeswitch/conf/*
chmod 777 freepbx-v3/freepbx/logs/
chmod 777 freepbx-v3/freepbx/cache/
chgrp -R www-data freepbx-v3/freepbx/config/*
chmod -R g+w freepbx-v3/freepbx/config/*
mkdir freepbx-v3/upload
chgrp -R www-data freepbx-v3/upload
chmod -R g+w freepbx-v3/upload

freepbx-v3 is in /var/www.

So after I do that, I went into FreePBX-v3 setup guide and follow instructions until I get to the Telephony Engine.

I get either this when setting Conf Directory to /usr/local/freeswitch/conf:

Unable to access directory
/usr/local/freeswitch/conf

Or this:

Unable to access directory
/opt/freeswitch/conf

Remember, I set /opt/freeswitch as a soft-symbolic link to /usr/local/freeswitch (ln -s /usr/local/freeswitch /opt/freeswitch).

I also did it the other way around. When I install FreeSWITCH from the ppa repo, I leave /opt/freeswitch alone, perform ln -s /opt/freeswitch /usr/local/freeswitch (/usr/local/freeswitch -> /opt/freeswitch), perform steps to configure permissions correctly, and it's still no go.

I am testing this in a VM, which I've assigned an IP address of 10.0.0.200. I access FreePBX v3 in Windows.

I'm trying to make my installation of FreeSWITCH+FreePBX as easy as possible, but it did not turn out that well in my Ubuntu Server 10.04 virtual machine (even a restart).


__________________

Asterisk 1.6 + FreePBX 2.8Beta
AMD Sempron 3400+ - 2GB RAM - Ubuntu 10.04
SFLphone (netbook) + PhonerLite (HTPC with Vista Ultimate x64)
Ubuntu Server as router + Windows Web Server 2008 in VirtualBox


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Changed Onwer For /usr/local/freeswitch

GraysonPeddie's picture

It is working. I have no permission errors after I get FreePBX version 3 up and running.

# chown www-data:daemon /usr/local/freeswitch

I also did change ownership for /etc/local/freeswitch/conf folder even though all the configuration files already have an owner of www-data as a user and a group. Everything else except for the freeswitch folder and freeswitch/conf folder are left untouched. The /usr/local/freeswitch must have a daemon group in order for the /etc/init.d/freeswitch script to work.

Doing...

# usermod -a -G www-data freeswitch

...does not work that way, because I still get an "unable to access directory" error message, so I must have figured out that the www-data must own the /usr/local/freeswitch (or /opt/freeswitch but I don't like where FreeSWITCH gets installed when installing FreeSWITCH from the repository)

Is there a way to make www-data be a "co-owner" of a "freeswitch" user?


__________________

Asterisk 1.6 + FreePBX 2.8Beta
AMD Sempron 3400+ - 2GB RAM - Ubuntu 10.04
SFLphone (netbook) + PhonerLite (HTPC with Vista Ultimate x64)
Ubuntu Server as router + Windows Web Server 2008 in VirtualBox


Only via groups

dschreiber's picture

A group should be fine - so something else is off. If the group owner is the same as whatever you're running Apache as and you enable write permissions, you should be OK.

By default groups can only read I think?

Try chmod -R g+w *

when inside the freeswitch/conf directory


__________________

Darren Schreiber
Co-Founder - 2600hz Project - www.2600hz.org
(Formerly Lead Developer, FreePBX v3)