I am using the dungog rpm. Changed the above but still get the:
file /opt/gallery2/html/embed.php is restricted by PHP open_basedir
error
What file is trying to access the files in the /opt/gallery folder and from what file on your system? You need to add the path of the folder where the script is located to the gallery PHPBaseDir setting, e. g. if you want to access a script in /opt/gallery from your Primary ibay you need to add /home/e-smith/files/ibays/Primary/html/ to your PHPBaseDir setting of the gallery share. Don't forget to restart your webserver to reflect configuration changes

As the configuration file for the /opt/gallery location is templated you need to make a copy of the template and modify this copy to reflect your desired changes:
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/92joomla /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
Edit the newly created section with your favourite editor and save the changes:
Regenerate your configuration file and restart the webserver:
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart