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) »
  • Install / XAMPP / XP Pro - How to grant write access to "sites/default"
Pages: 1 2 [3]

Author Topic: Install / XAMPP / XP Pro - How to grant write access to "sites/default"  (Read 47864 times)

thankyoucivicrm

  • Guest
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
November 30, 2008, 02:16:19 pm
Thank you! it worked for me! ;D ;D ;D ;

Quote from: ob on October 31, 2008, 05:49:27 am
Hi guys.....

No need to edit files or anything, simply need to change remove the Read-Only status from the directory.
Though not using the Explorer way!!

Here we go:
The method that worked for me was to go to start/run cmd  and go to the /sites folder. (or if you have cmdhere installed, in explorer right click folder cmdhere). Once in this folder apply the following command to solve the problem:
attrib -r default /s /d


Problem solved,

Let me know if it worked

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
November 30, 2008, 09:39:24 pm
patroclas:

You need to increase max execution time in your php.ini.

Kurund
Found this reply helpful? Support CiviCRM

patroclas

  • Guest
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
December 01, 2008, 04:47:05 am
Thanks Kurund, but that is not possible on most shared hosting services.
I abandoned civi-crm some weeks ago as a result of these problems. I found the interface with Drupal to be poor and the problems with testing locally to be a barrier that prevented the progress of my project. I have been able to do all I needed with Drupal and a few other modules.
The replies to the original question have been useful, so thanks.
Unsubscribing

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
December 01, 2008, 04:53:24 am
patroclas:

I guess you can use .htaccess to max execution time, if you search forum you will find few options :)

Kurund
Found this reply helpful? Support CiviCRM

blythe

  • Guest
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
December 15, 2008, 12:53:17 am
Thank you for this thread, as I was having the exact same problem.  I agree with Eileen, though, that the install script should be fixed for this issue.

blueskiwi

  • Guest
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
December 24, 2008, 03:24:29 am
Thanks so much, this worked.

Previously I was finding that in Windows right-click properties for the Default folder by 'Read Only' I was getting the 'green square' tick box, which is sort of half ticked and usually means that there are files below with a mix of permissions. But I couldn't work out why I couldn't get Default or any of the folders below to stay unticked, ie writeable.  Windows Explorer helpfully doesn't tell you what it means or why it's failing to untick that box.

Anyway, great, that attrib -r command worked perfectly.

It suggests maybe there's nothing the install script can do about weird Windows behaviour, but that this fix should be mentioned in the install instructions?

Quote from: ob on October 31, 2008, 05:49:27 am
Hi guys.....

No need to edit files or anything, simply need to change remove the Read-Only status from the directory.
Though not using the Explorer way!!

Here we go:
The method that worked for me was to go to start/run cmd  and go to the /sites folder. (or if you have cmdhere installed, in explorer right click folder cmdhere). Once in this folder apply the following command to solve the problem:
attrib -r default /s /d


Problem solved,

Let me know if it worked

obiuquido144

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 4
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
October 27, 2009, 03:30:07 pm
Updated the insturctions in http://wiki.civicrm.org/confluence/display/CRMDOC/Drupal+Installation+Guide (just metioned the message and pointed to the relevant msg here)
Feel free to correct my non-native English wording etc...

thinkpadius

  • Guest
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
May 03, 2010, 02:53:46 pm
Quote from: ob on October 31, 2008, 05:49:27 am
Hi guys.....

No need to edit files or anything, simply need to change remove the Read-Only status from the directory.
Though not using the Explorer way!!

Here we go:
The method that worked for me was to go to start/run cmd  and go to the /sites folder. (or if you have cmdhere installed, in explorer right click folder cmdhere). Once in this folder apply the following command to solve the problem:
attrib -r default /s /d


Okay let me just point out I'm a little bit of a noob at windows and I've never used the cmd function from the start menu before.  But I figured it out.

I run a wamp server (I'm making an internal website) on windows xp.  I run cmd from the start menu and to get this to work you need to paste in the address for your /sites folder, followed by a space followed by pasting the command above.  The mistake is to think it is two steps/lines!

so it will look something like this:

C:\wamp\www\YourDrupalWebsite\sites attrib -r default /s /d

any other way didn't work for me.  and google was not my friend on this one!  hope this add some clarity.

Sky

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: Focusing on 4 w/ D7
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
December 30, 2011, 10:30:11 pm
I went through the same story, on Windows 7 and neither explorer nor "attrib -R default /S /D" or files did it for me

At the end, based on Eileen's remark that is_writable doesn't work the same way on Windows, I ended up patching the installer to skip the test and it worked fine.

Specifically, I went into the function requireWriteable in index.php in the install director, and commented out the if logic within the function only to get through the install (in 4.1 beta, this corresponds to lines 557-570) and reverted it back after the install was done.

Adding one more option/idea for comments




Rajesh

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 10
  • CiviCRM version: 4.2.x, 4.3.x, 4.4.x
  • CMS version: Drupal 7.xx, Wordpress 3.5.x - 3.6.x, Joomla 3.1
  • MySQL version: 5.5.20
  • PHP version: 5.3.10
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
January 03, 2012, 03:44:41 am
I had this same issue(WAMP on Windows XP). It worked after i patched the installer (sites\all\modules\civicrm\install\index.php)

Code: [Select]
    function requireWriteable($filename, $testDetails, $absolute = false) {
        $this->testing($testDetails);
        if ( ! $absolute ) {
            $filename = $this->getBaseDir() . $filename;
        }
        // Check if Windows OS. Under Windows, 'is_writeable' only returns the read-only attribute status, not the actual permissions (ACL), So forcing chmod 777 if Windows 
        if (strtolower((substr(PHP_OS, 0, 3))) == 'win') {
            chmod($filename, 0777);   
        }
        if(!is_writeable($filename)) {
            $name = null;
            if ( function_exists( 'posix_getpwuid' ) ) {
                $user = posix_getpwuid(posix_geteuid());
                $name = '- ' . $user['name'] . ' -';
            }

            if ( ! isset( $testDetails[2] ) ) {
                $testDetails[2] = null;
            }
            $testDetails[2] .= "The user account used by your web-server $name needs to be granted write access to the following directory in order to configure the CiviCRM settings file:\n$filename";
            $this->error($testDetails);
        }
    }

Hope it helps some one else.
« Last Edit: January 03, 2012, 03:47:35 am by Rajesh »

awennerlind

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: Wordpress Beta 4.1
  • CMS version: Wordpress 3.3.1
  • MySQL version: not sure
  • PHP version: not sure
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
January 06, 2012, 01:19:55 pm
Commented this out of the install.php file and all is well:       

    foreach ( $writableDirectories as $dir ) {
                $this->requireWriteable( $cmsPath . DIRECTORY_SEPARATOR . $dir,
                                         array("File permissions", "Is the $dir folder writeable?", null ),
                                         true );
       

THANK YOU Semper Fi. This is the only thing that worked for me. A savvy nonprofit chic, working off a mac, who doesn't know a ton of this crazy code stuff figured it out thanks to your help. :-)

And thank you CiviCRM for your hard work on this. Can't wait to get things up and running.


arawlings

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.0.8
  • CMS version: Drupal 7.x
  • MySQL version: 5.0
  • PHP version: 5.3.5
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
February 03, 2012, 07:23:38 am
Does anyone else have the problem with error messages at the top of the page after installing CiviCRM 4.0.8 on Drupal 7.12 running on Xampp 1.7.4?

I was only able to get through the install process by commenting out the check-logic.

BatRosko

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 6
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
March 08, 2012, 06:51:47 am
Resolution for Windows 7 64 bit

1. Install SciTe (if you don’t have it) to open .php file
2. Navigate to: C:\xampp\htdocs\drupal\sites\all\modules\civicrm\install
3. Right click on index.php end choose Edit with SciTE
4. Scroll down to 572 and type /** and on 585 type */
5. Restart Apache Service
6. Hit Check Requirements and Install CiviCRM

Once the installation completed remove /** and  */
« Last Edit: March 08, 2012, 06:55:17 am by BatRosko »

DerekL

  • I post frequently
  • ***
  • Posts: 132
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.54
  • PHP version: 5.2.17
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
April 03, 2012, 12:46:28 pm
Same issue here. Fresh local install of Drupal 7.12, Civi 4.1.1 on Z-WAMP.

Attrib command didn't do the trick, had to hack install.php as well.

redking

  • I’m new here
  • *
  • Posts: 28
  • Karma: 2
  • CiviCRM version: CiviCRM 4.1.0
  • CMS version: Joomla! 2.5.4
  • MySQL version: 5.1.30
  • PHP version: 5.2.8
Re: Install / XAMPP / XP Pro - How to grant write access to "sites/default"
May 18, 2012, 02:26:45 am
Quote from: Deepak Srivastava on October 04, 2008, 06:19:34 am
If you suspect its a code issue try commenting the line 266 to 270 (shown below) in the file - civicrm/install/index.php, which is actually responsible for verifying the permission and check.
Code: [Select]
            foreach ( $writableDirectories as $dir ) {
                $this->requireWriteable( $cmsPath . DIRECTORY_SEPARATOR . $dir,
                                         array("File permissions", "Is the $dir folder writeable?", null ),
                                         true );
            }

Thank you this was a perfect solution for WAMP on Windows for DURPAL
« Last Edit: May 21, 2012, 09:02:20 pm by redking »

Pages: 1 2 [3]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Install / XAMPP / XP Pro - How to grant write access to "sites/default"

This forum was archived on 2017-11-26.