CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Drupal 6 Civi 4.4.3 Why does it want to locate the files directory within config
Pages: [1]

Author Topic: Drupal 6 Civi 4.4.3 Why does it want to locate the files directory within config  (Read 893 times)

mdlueck

  • Ask me questions
  • ****
  • Posts: 382
  • Karma: 4
  • CiviCRM version: 4.7.24
  • CMS version: Drupal 6.x
  • MySQL version: 5.5.54
  • PHP version: 5.3.10
Drupal 6 Civi 4.4.3 Why does it want to locate the files directory within config
January 11, 2014, 02:45:51 pm
I am finally working through rebuilding our CiviCRM implementation. On a test copy of the production site I have verified basic operations were successful, then removed all of CiviCRM from the test copy site. I specifically removed the records from the Drupal system table which were referencing the old version of CiviCRM - to get it "good and clean". I dropped all of the tables in the test Civi database. I dropped the DB permissions and recreated the ID according to the current instructions.

Working through the installation, on the DB password screen, the bottom two rows are red / in error:

Code: [Select]
Is the /srv/www/sites/d1.testdomain.org/www/sites/d1.testdomain.org/files folder writeable? The user account used by your web-server - www-data - needs to be granted write access to the following directory in order to configure the CiviCRM settings file:
//srv/www/sites/d1.testdomain.org/www/sites/d1.testdomain.org/files
Is the /srv/www/sites/d1.testdomain.org/www/sites/d1.testdomain.org folder writeable? The user account used by your web-server - www-data - needs to be granted write access to the following directory in order to configure the CiviCRM settings file:
//srv/www/sites/d1.testdomain.org/www/sites/d1.testdomain.org

The old CiviCRM version 3.4.6 was locating its files directory at:
/srv/www/sites/d1.testdomain.org/www/files/

which I was all right with. Our Drupal site operates with Drupal Private File Download method, so the Drupal Files directory is actually really at a non-web-accessible location on the server. I have just been applying "nod and smile" to where CiviCRM has been thinking /files/ should be located.

Some time ago, I installed a symlink to spoof CiviCRM where our config file resides. CiviCRM seemed to be "pro multi-site" whereas I am just fine with installing Drupal in non multi-site mode. So the symlink gets me around having to hack CiviCRM files. The symlink is as follows:

Code: [Select]
mdlueck@cirweb01:/srv/www/sites/d1.testdomain.org/www/sites$ ls -al
total 28
drwxrwsr-x+  4 mdlueck www-data   66 Dec 14 18:13 .
drwxrwsr-x+ 69 mdlueck www-data 8192 Jan  1 17:21 ..
drwxrwsr-x+  4 mdlueck www-data   50 Dec 14 16:55 all
lrwxrwxrwx   1 mdlueck www-data    7 Dec 14 16:55 d1.testdomain.org -> default
dr-xr-sr-x+  2 mdlueck www-data   25 Jan  4 18:28 default

Within directory default, on our production site are the following files:

Code: [Select]
$ ls -al /srv/www/sites/testdomain.org/www/sites/default/
total 32
dr-xr-sr-x+ 2 mdlueck www-data    52 Mar  5  2012 .
drwxrwsr-x+ 4 mdlueck www-data    63 Nov 10 18:11 ..
-r--r--r--+ 1 mdlueck www-data 11767 Nov 10 18:12 civicrm.settings.php
-r--r--r--+ 1 mdlueck www-data  9590 Nov 10 18:12 settings.php

And yes, the same is accessible via the symlink:

Code: [Select]
$ ls -al /srv/www/sites/testdomain.org/www/sites/testdomain.org/
total 32
dr-xr-sr-x+ 2 mdlueck www-data    52 Mar  5  2012 .
drwxrwsr-x+ 4 mdlueck www-data    63 Nov 10 18:11 ..
-r--r--r--+ 1 mdlueck www-data 11767 Nov 10 18:12 civicrm.settings.php
-r--r--r--+ 1 mdlueck www-data  9590 Nov 10 18:12 settings.php

I am really not all right with CiviCRM demanding to put the /files/ directory within that directory all of a sudden. "Hands off!!!"

Could someone please explain the rational behind what CiviCRM 4.4.3 is endeavoring to do on Drupal 6 "non multi-site" installations?
« Last Edit: January 11, 2014, 05:02:19 pm by mdlueck »
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

mdlueck

  • Ask me questions
  • ****
  • Posts: 382
  • Karma: 4
  • CiviCRM version: 4.7.24
  • CMS version: Drupal 6.x
  • MySQL version: 5.5.54
  • PHP version: 5.3.10
Re: Drupal 6 Civi 4.4.3 Why does it want to locate the files directory within config
January 17, 2014, 03:56:39 pm
All right, I was able to get CiviCRM installed. Here is what I did:

1) Change perms on directory:
Code: [Select]
/srv/www/sites/d1.testdomain.org/www/sites$ chmod a+w default
2) Make files directory unrder the Drupal configuration directory:
Code: [Select]
/srv/www/sites/d1.testdomain.org/www/sites/d1.testdomain.org$ mkdir files
$ ls -al
dr-xr-sr-x+ 3 mdlueck www-data    64 Jan 17 17:33 .
drwxrwsr-x+ 4 mdlueck www-data    66 Dec 14 18:13 ..
drwxrwsr-x+ 3 mdlueck www-data    20 Jan 17 17:33 files
-r--r--r--+ 1 mdlueck www-data  9600 Jan  1 17:20 settings.php
and made sure it was correctly 0775 perms, per our /srv/www standards.

3) Ran the installer successfully

4) Edited the resulting / created civicrm.settings.php updating the database URL's to use the mysqli:// driver, same that Drupal is using.

5) Changed permissions on the resulting / created civicrm.settings.php files to be read only:
Code: [Select]
/srv/www/sites/d1.testdomain.org/www/sites/default$ chmod a-w civicrm.settings.php
:/srv/www/sites/d1.testdomain.org/www/sites/default$ ls -al
total 36
drwxrwsrwx+ 3 mdlueck www-data    64 Jan 17 17:33 .
drwxrwsr-x+ 4 mdlueck www-data    66 Dec 14 18:13 ..
-r--r--r--+ 1 mdlueck www-data 12132 Jan 17 17:36 civicrm.settings.php
drwxrwsr-x+ 3 mdlueck www-data    20 Jan 17 17:33 files
-r--r--r--+ 1 mdlueck www-data  9600 Jan  1 17:20 settings.php
:/srv/www/sites/d1.christians-in-recovery.org/www/sites/default$

6) Made the Drupal configuration directory read only again, yet files within that directory is still 0775, and CiviCRM appears to be all right with that scenario.
Code: [Select]
/srv/www/sites/d1.testdomain.org/www/sites$ chmod a-w default
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Drupal 6 Civi 4.4.3 Why does it want to locate the files directory within config

This forum was archived on 2017-11-26.