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) »
  • Proper permissions for folders and files in CiviCRM?
Pages: [1]

Author Topic: Proper permissions for folders and files in CiviCRM?  (Read 5359 times)

mikael.andersson@charity.se

  • Guest
Proper permissions for folders and files in CiviCRM?
October 27, 2009, 08:25:04 am
I have messed up the permissions for CiviCRM and would like to know where I can find the proper permissions for files and folders.

I followed the guide for setting the permissions for Drupal according to http://drupal.org/node/244924 and this works fine, at least for Drupal, but it seems like CiviCRM was messed up at the same time.

After having set write permissions on the upload folder (see below) it worked a lot better.
/drupal/sites/default/files/civicrm/upload

Now some forms are at least loaded in CiviCRM but I get e.g.:
"failed to open stream: Permission denied in .drupal/sites/all/modules/civicrm/CRM/Core/IDS.php on line 115."

Thanks in advance,

Mikael

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Proper permissions for folders and files in CiviCRM?
October 27, 2009, 09:56:48 am
Hey,

Whole sites/default/files/civicrm directory (with subdirectories) should be readable/writable to a user which runs your webserver, all the other civicrm files should just be readable. The fact that you're getting an error from IDS means something is still wrong with 'upload' dir permissions, or specifically with Config.IDS.ini in this directory.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

mikael.andersson@charity.se

  • Guest
Re: Proper permissions for folders and files in CiviCRM?
October 27, 2009, 10:19:34 am
Many thanks for that. I think I have setup everything properly now. I just wonder, for all others who are looking in the doc for this information, can this be found in the CiviCRM doc? Otherwise it should be included.

Cheers,

Mikael

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Proper permissions for folders and files in CiviCRM?
October 27, 2009, 10:35:21 am
Hey,

Would you like to step up and add this information to documentation? It's a wiki, so you just need to create an account and you'll be able to edit pages.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

mikael.andersson@charity.se

  • Guest
Re: Proper permissions for folders and files in CiviCRM?
October 27, 2009, 11:17:23 am
Absolutely. I have an account now and have logged in. Any ideas where to put the information?

Cheers,

Mikael

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Proper permissions for folders and files in CiviCRM?
October 27, 2009, 01:17:25 pm
Great, thanks. :-)

Directory and file permissions are mentioned in Drupal Installation Guide. It would be great if you could refine the piece of text in the frame in Review Permissions section and make it contain all the information you think is necessary, based on your recent experience. After that, it might be good to add similar frame in Upgrade Drupal Sites to 3.0, for example in Upgrade Trouble-shooting section. If you feel like doing a bit more, you might want to repeat the same steps for Joomla and Standalone documents, but if you would rather stick to Drupal, just let me know when you introduced your changes and I'll replicate them for other documents.

Thanks again in advance. :-)
m

Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

mikael.andersson@charity.se

  • Guest
Re: Proper permissions for folders and files in CiviCRM?
October 27, 2009, 02:40:17 pm
I suggest making the following two sections in Review permissions:
1. File system permissions
2. Drupal role permissions

In the second one, which I am not planning to improve, the following will be included (excerpt from the 'Review permissions' section):

"* Go to Administer » User management » Permissions
..."

As for the first one, I have the following questions and comments (first the citation and then my question/comment) regardin the present green section:

"Note that Drupal tries to create the /files/ directory (and make it writeable), but only when saving admin/settings."

What does ", but only when saving admin/settings" mean?

"Refer to Step 2 for instructions on directories to create and permissions to set."

Where do one find "Step 2"?

Basically, the first green section does not say much, I think.

I would probably just include the following in this section:

Drupal:
Make sure that the permissions are setup properly (see File Permissions and Ownership For Security, http://drupal.org/node/244924). The files directory (i.e. sites/default/files) should be readable and writable by the user which runs the web server, which is mentioned in 'File Permissions and Ownership For Security', and the same goes for all of its subdirectories.

CiviCRM:
Based on what is stated above the whole sites/default/files/civicrm directory (with subdirectories) should have the same permissions, i.e. be readable/writable to a user which runs your webserver. As for all files, they should just be readable by the same user.

I am actually not certain regarding above. Is it correct that all directories in the directory files should be both writable and readable by the web user? I have a directory 'languages' in the files directory. Should this be writable as well?
 
Thanks,

Mikael

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Proper permissions for folders and files in CiviCRM?
November 03, 2009, 03:33:05 am
Quote from: mikael.andersson@charity.se on October 27, 2009, 02:40:17 pm
"Note that Drupal tries to create the /files/ directory (and make it writeable), but only when saving admin/settings."

What does ", but only when saving admin/settings" mean?

It's a URL to Drupal page, which - when being saved - truggers creating files/ directory. Maybe a better way would be to change it to http://yoursite/admin/settings

Quote from: mikael.andersson@charity.se on October 27, 2009, 02:40:17 pm
"Refer to Step 2 for instructions on directories to create and permissions to set."

Where do one find "Step 2"?

It refers to second section in the installation document (title: Drupal Installed).

Quote from: mikael.andersson@charity.se on October 27, 2009, 02:40:17 pm
Basically, the first green section does not say much, I think.

I would probably just include the following in this section:

Drupal:
Make sure that the permissions are setup properly (see File Permissions and Ownership For Security, http://drupal.org/node/244924). The files directory (i.e. sites/default/files) should be readable and writable by the user which runs the web server, which is mentioned in 'File Permissions and Ownership For Security', and the same goes for all of its subdirectories.

CiviCRM:
Based on what is stated above the whole sites/default/files/civicrm directory (with subdirectories) should have the same permissions, i.e. be readable/writable to a user which runs your webserver. As for all files, they should just be readable by the same user.

I am actually not certain regarding above. Is it correct that all directories in the directory files should be both writable and readable by the web user? I have a directory 'languages' in the files directory. Should this be writable as well?

That is correct for CiviCRM -  all directories in the directory files/civicrm should be both writable and readable by the web user. Not sure about languages directory - Drupal might require different permissioning setup for different modules, so I would rather refer people to external documents on this.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Proper permissions for folders and files in CiviCRM?

This forum was archived on 2017-11-26.