Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to install CiviCRM on a Joomla 1.5.17 web server running Ubuntu 9.10. Uploading the package to the tmp directory in /var/www/[site name]/tmp and installing creates this error:

Warning: fopen(/var/www/trbcp/administrator/components/com_civicrm/civicrm/templates/CRM/common/civicrm.settings.php.tpl) [function.fopen]: failed to open stream: Permission denied in /var/www/trbcp/libraries/joomla/filesystem/file.php on line 240

Warning: fopen(/var/www/trbcp/administrator/components/com_civicrm/civicrm/templates/CRM/common/civicrm.settings.php.tpl) [function.fopen]: failed to open stream: Permission denied in /var/www/trbcp/libraries/joomla/filesystem/file.php on line 240

Warning: include_once(/var/www/trbcp/administrator/components/com_civicrm/civicrm.settings.php) [function.include-once]: failed to open stream: Permission denied in /var/www/trbcp/administrator/components/com_civicrm/configure.php on line 115

Warning: include_once() [function.include]: Failed opening '/var/www/trbcp/administrator/components/com_civicrm/civicrm.settings.php' for inclusion (include_path='.') in /var/www/trbcp/administrator/components/com_civicrm/configure.php on line 115

Warning: require_once(DB.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/trbcp/administrator/components/com_civicrm/configure.php on line 140

Fatal error: require_once() [function.require]: Failed opening required 'DB.php' (include_path='.') in /var/www/trbcp/administrator/components/com_civicrm/configure.php on line 140

Initially I got a permissions denied error and thought that Joomla did not have permissions to all its directories but looking at Help->System information all the necessary directories are writable. I then decided to chmod 777 all the directories and try again but it still fails. Looking at the directories afterwards it seems that the new directories being created are not being created 777. By changing them I can get at least one step further before the error appears again. My question is does anyone know how to get round this? I am thinking that the new directories being created will require sudo privileges to have mv and create actions carried out, hence the permission denied errors. Can this be configured in Joomla? Or is there a way to specify that new directories created in /var/www/[site name] take 777 by default? any help greatly appreciated!

EDIT: P.S. if anyone could give me a clue as to how the insert code feature works as well that would be great! Might make this post a bit more readable!

EDIT2: Well I have had a bash at changing the permissions and ownership.

sudo chown -R www-data:www-data /var/www/trbcp

I then tried changing the whole /var directory (insecure I know but this is a test and dev server for me to find my feet on) to 777 and still getting permission errors. It seems to be error opening stream? Not a php guy so not sure what that is but could it be that permissions to run php script need to change? any thoughts greatly appreciated.

EDIT3: Well I never got to the bottom of it but am assuming it was something to do with the porting of the site and not the environment. I tested installing a fresh blank site and got that to work no problems. I then proceeded to manually recreate or the articles etc. Thanks for the help though as it certainly helped me learn a bit more about permissions on linux etc.

share|improve this question
    
to insert code: superuser.com/editing-help –  Andy Jun 4 '10 at 13:47
    
Once you've chmodded to 777 I don't think ownership really matters any more. Is it exactly the same error output as you posted above? Can you briefly explain what you do to install Joomla? –  Andy Jun 7 '10 at 13:15
    
Normally I would follow the ubuntu community guide to install the site. This time however i used Akeeba Backup to port a live site from a hosted server to a local server for testing and possible future deployment as the real server. I am now thinking if this has somewhat skewed the permissions. Tis odd as I have tried everything from -R 777, ownership to www-data, me and root as well as adding myself to the sudoers file. All to no avail. Am most perplexed but feel I may have the wrong approach :) –  Tim Alexander Jun 15 '10 at 12:57

2 Answers 2

up vote 1 down vote accepted

I've not used Joomla, but I'm familiar with hosting web apps. You want to make sure that your folders are owned by the user that the web server (Apache?) runs as. On Ubuntu I think that's www-data by default. The way I do it is to give read/write to owner and group, and make my user a member of the group so that I can navigate and play with the files as myself, and Apache can also do what it needs to.

share|improve this answer
    
that sounds like it might be the approach I am missing. I will make some changes and let you know thanks –  Tim Alexander Jun 4 '10 at 15:16

go to terminal and type

  gksudo nautilus

then go to system drive(computer) and right click and select permissions and change owner to your username and save

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.