Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 5
Error: Please check for sufficient write file permissions
 
thedoc
Jr. Member
 
Total Posts:  8
Joined:  2008-02-04
 

I can’t access Magento Connect.  I get this message every time:

Error: Please check for sufficient write file permissions

I have a dedicated server and configured it to the requirments set by Magento and I keep getting this message.

I have spent a bit of time trying to make it function but I can’t figure it out.  I have altered write permissions but stil no luck.

Any Ideas??

 
Magento Community Magento Community
Magento Community
Magento Community
 
thedoc
Jr. Member
 
Total Posts:  8
Joined:  2008-02-04
 

Is it possible that I am the only one with this porblem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
porterhouse
Jr. Member
 
Total Posts:  27
Joined:  2008-02-23
 

I’m having that error too.  hosted with helping hand host and have had a ticket open since mid-last week, yet to be solved.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nabuhonodozor
Member
 
Avatar
Total Posts:  51
Joined:  2008-03-27
 

Browse through forum - there were at least two post about this issue. For now, You have to chmod 777 all directories.

 
Magento Community Magento Community
Magento Community
Magento Community
 
manolodf
Member
 
Avatar
Total Posts:  56
Joined:  2008-03-28
Dallas, TX / Hong Kong
 

There were a couple of other fixes as well, including chown of the index.php file and a command that gave permissions, I am not sure if it made the knowledge base but there were definately some threads on it a few days ago when Magento Connect Launched.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 

You need to login to SSH and run the following command:

chmod -R o+w magento

If your install is in another folder, then change magento above to something else. It’s obviously not the ideal solution here, as you could have your install in the public_html (or httpdocs or whatever) directory, and setting the permissions to 777 isn’t the most secure method here. I’m sure Magento will work on that, I know they’re aware of the issue.

By the way, depending on how you’ve ran the install, you might have to run the PEAR package via SSH so the extensions actually show up in Magento Connect. If you see nothing in there, your install is not setup correctly. You’ll need to run the following from the base Magento directory, assuming you’ve installed Magento using the full installer, NOT the downloader (which I highly advise not using):

./pear mage-setup .
./
pear install -f magento-core/Mage_All_Latest

And in case anyone is wondering, below is what you should be running via SSH to install Magento (without sample data):

wget http://www.magentocommerce.com/downloads/assets/1.0/magento-1.0.tar.gz
tar -zxvf magento-1.0.tar.gz
cd magento
chmod o
+var var/.htaccess app/etc
chmod 
-R o+w media

Now run either the console-based or web-based installer. Then run this from SSH (make sure you’re in the magento directory or whatever you’re renamed it to):

./pear mage-setup .
./pear install -f magento-core/Mage_All_Latest
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*

I believe running the above will overwrite some permissions after you run the above part, so you might also have to run this afterwards:

cd ..
chmod -R o+w magento

Also, to access Magento Connect, your host cannot have openbase_dir restriction in effect. It needs to either be disabled or removed for your specific account.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

@Crucial: I’ve thought openbase_dir problem was resolved, do you still encounter issues with this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 
Moshe - 08 April 2008 08:30 PM

@Crucial: I’ve thought openbase_dir problem was resolved, do you still encounter issues with this?

Yup. I did an install about 2 hours ago and when I went to check the Magento Connect in the backend, there was a warning at the top. The extensions did show up though, but I actually had to remove the restriction from the account, which isn’t a problem or anything, but it did show up in there.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 

By the way, here’s the error code:

Warningfile_exists() [function.file-exists]open_basedir restriction in effectFile(/usr/local/etc/pear.conf) is not within the allowed path(s): (/home/username:/usr/lib/php:/usr/local/lib/php:/tmpin /home/username/public_html/downloader/pearlib/php/PEAR/Config.php on line 625
 
Magento Community Magento Community
Magento Community
Magento Community
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

i still have the same problem here in germany smile, can’t access the magento connect manager, correct chmods are set.
---
@Crucial - Try to set a

php_admin_value open_basedir none
between your <directory></directory> entries…
 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 
jan212 - 09 April 2008 12:03 PM

i still have the same problem here in germany smile, can’t access the magento connect manager, correct chmods are set.
---
@Crucial - Try to set a

php_admin_value open_basedir none
between your <directory></directory> entries…

Jan,

What error is coming up, the “write file permissions” one? If you have shell access, just run the following on the actual directory that has all the Magento files:

chmod -R 777 magento

It will work after that.

And regarding open_basedir, I just had to exclude the user I was doing the install on from the restriction (via WHM). I guess the server I was on had the restriction in effect.

I don’t recall if we use it everywhere or not since I never check the Magento Connect manager after doing an install, but it works now.

Thanks though!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

Exactly, the “write file permissions” one. Yes, i have shell access but i still set the magento folder to chmod 777. Could it be a conflict with the UID/GID?
Thanks in advance, greetings from germany and gn8 (i have to go sleep now, it’s 02:34 at night)…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 

Are you doing a recursive chmod? Is there any sort of suexec running? What about the user:group status of the files/directories? Are you able to recursively chown that to your username? Is this hosted by a company or is it yours, e.g. you have full access?

If you’d like, you can send me a PM with your login details (for SSH) and I can take a look.

Get some sleep though, I’m about to head out myself to the sports bar and watch the Suns vs. Spurs game :D

 
Magento Community Magento Community
Magento Community
Magento Community
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

@Crucial - hello smile, i’m back and hope you had a nice evening in the sports bar…

It’s my own Server(OpenSuse 10.2, PHP 5.2.5, mysql 5.0.26 and Plesk 8.3), i have full access and doing the most things with putty.
-And, no, i didn’t do the 777 recursive.
-No suexec

I try to explain what i did till now:
- wget and untar the magento 1.0 to accountroot/httpdocs/magento, did it as user root
- Then i did a chown -R/ chgrp -R with the correct account based username and groupID(after untar the UID was set to 510 and the GID to 521)
- After that i did the default chmod setup from the magento ssh install howto
---
Another problem is, that if i setup include_path(had the 5.2.5 include_path bug, http://www.magentocommerce.com/boards/viewthread/1848/) in my vhost.conf(like httpd.conf) to

.:usr/share/php5/PEAR:/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/app/code/core:/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/app/code/local:/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/app/code/community:/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/lib:/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/downloader

i get an include problem again, but only in the backend at the (magento/index.php/admin/extensions_local/) connect manager

Warning: require_once(PEAR.php): failed to open streamNo such file or directory in /srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/downloader/pearlib/php/PEAR/Registry.php on line 28
[0] in 
require_once() in /srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/downloader/pearlib/php/PEAR/Registry.php on line 28
[1] in 
require_once("/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/downloader/pearlib/php/PEAR/Re"in /srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/lib/Varien/Pear.php on line 25
[2] in 
require_once("/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/lib/Varien/Pear.php"in /srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/lib/Varien/Pear/Package.php on line 3
[3] in 
require_once("/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/lib/Varien/Pear/Package.php"in /srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/app/code/core/Mage/Adminhtml/controllers/Extensions/LocalController.php on line 22
[4] in 
include("/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/app/code/core/Mage/Adminhtml/c"in /srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php on line 116
[5] in Mage_Core_Controller_Varien_Router_Admin
->match(Mage_Core_Controller_Request_Httpin /srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/app/code/core/Mage/Core/Controller/Varien/Front.php on line 147
[6] in Mage_Core_Controller_Varien_Front
->dispatch() in /srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/app/Mage.php on line 431
[7] in Mage
::run("default"in /srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/index.php on line 40

Fatal error
: require_once(): Failed opening required 'PEAR.php' (include_path='.:usr/share/php5/PEAR:/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/app/code/core:/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/app/code/local:/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/app/code/community:/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/lib:/srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/downloader'in /srv/www/vhosts/null212.de/subdomains/saintgeorges24/httpdocs/magento/downloader/pearlib/php/PEAR/Registry.php on line 28
---

Here’s a screenshot from the actual chmod , UID+GID status:

Image Attachments
set1.gif
 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 

Ignore the SSH wiki, it’s incomplete. Do this instead:

wget http://www.magentocommerce.com/downloads/assets/1.0/magento-1.0.tar.gz
tar -zxvf magento-1.0.tar.gz
cd magento
chmod o+w var var/.htaccess app/etc
chmod -R o+w media

After that, switch over to your browser and run the web-based installer. Once that is finished, go back to SSH and run this (assuming you’re switching applications here and you’ve left off with what I told you to run above):

./pear mage-setup .
./pear install -f magento-core/Mage_All_Latest
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
chmod -R 777 magento

The very last command only applies if you’re leaving Magento installed as is, if you’ve moved it to another directory then rename the part after 777.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

Hello crucial (and all other peops surfin around here),

at first let me say thanks…

are you sure for that recursive chmod?

chmod -R 777 magento

(After that the connect manager works, but every file is now 777)

another problem i can’t get rid of is the include_path problem i described above, any help would be good

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 5