Magento Forum

Page 1 of 2
Magento Connect: “Warning: Your Magento folder does not have sufficient write permissions.”
 
maooley
Jr. Member
 
Total Posts:  29
Joined:  2009-10-06
 

Ok folks,

I have A pretty huge issue to work out here. I am installing a fresh install of Magento ver. 1.5.0.1. I set (and double-checked) that all of my directories were set to the proper permissions to install Mage.

My problem is that my Magento Connect manager is throwing the permissions error copied below. I have searched and searched and searched for a solution to this problem… I even basically ruined 3 weeks worth of work by running a recursive permissions script via SSH (some script that I copied out of the Magento forums from someone having a similar problem.)

My problem is, I don’t want to run scripts that I don’t know what they do. They can ruin my entire site, and I don’t trust them. There HAS to be a way to fix this problem manually. I am seeing this same error going back to 2008. Has Magento really missed the bus on this huge of an issue for this long?

I have even tried to set up the new FTP option in Mage 1.5.0.1., but cannot seem to get that to work either. (Anyone know what the “Installation Path:” field needs to be set to?)

Someone please help!!!

ERROR:

Warning: Your Magento folder does not have sufficient write permissions.

If you wish to proceed downloading Magento packages online, please set all Magento folders to have writable permission for the web server user (example: apache) or set up FTP Connection on the Magento Connect Manager Settings tab.

Image Attachments
Screen shot 2011-02-24 at 1.51.56 PM.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 

The following is 100% safe to run from the directory where Magento is installed:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod o+var var/.htaccess app/etc
chmod 550 mage
chmod 
-R o+w media

If that is not working, try setting all directories to 777 by doing this:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 777 {} \;
chmod o+var/.htaccess
chmod 550 mage
 
Magento Community Magento Community
Magento Community
Magento Community
 
maooley
Jr. Member
 
Total Posts:  29
Joined:  2009-10-06
 

Isn’t setting all directories to 777 a bad idea from a security standpoint? Not to mention – Shouldn’t there be a way to do this without running batch permissions changes? Just seems dangerous… I don’t feel good about doing it.

Last time I tried this, it basically screwed up my entire site and cost me 3 weeks of work. Here is my message from GoDaddy below from that last incident. The only thing I could figure was either 1) I ran the scripts in the wrong directory or else, 2) The scripts were in the right directory, but screwed everything up.

@Crucial – Do you think I might have just ran this from the wrong directory last time?

Godaddy Said:

It appears that two permissions commands were run on your server that have caused the issues you are experiencing:

find . -type d -exec chmod 777 {} \;
find . -type d -exec chmod 755 {} \;

These commands have effectively given necessary system services the incorrect permissions across all server files. As a courtesy we have corrected the permissions for the SSHd service which has restored remote access to your server via SSH. You are welcome to try and correct the permissions on the entire server, but this would be a truly grueling task. Instead, I would suggest that you back up any data you require from the server and reprovision the server at your earliest convenience.

 
Magento Community Magento Community
Magento Community
Magento Community
 
maooley
Jr. Member
 
Total Posts:  29
Joined:  2009-10-06
 

Anyone? Anyone?

Crucial - 24 February 2011 10:24 AM

The following is 100% safe to run from the directory where Magento is installed:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod o+var var/.htaccess app/etc
chmod 550 mage
chmod 
-R o+w media

If that is not working, try setting all directories to 777 by doing this:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 777 {} \;
chmod o+var/.htaccess
chmod 550 mage
 
Magento Community Magento Community
Magento Community
Magento Community
 
maooley
Jr. Member
 
Total Posts:  29
Joined:  2009-10-06
 

Crucial,

I’m sorry I ever doubted you!!

The 777 command worked, and Magento Connect is now running. I’m wondering… Do I need to reset my permissions after I am finished in Magento Connect?

Thanks,

Matt

Crucial - 24 February 2011 10:24 AM

The following is 100% safe to run from the directory where Magento is installed:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod o+var var/.htaccess app/etc
chmod 550 mage
chmod 
-R o+w media

If that is not working, try setting all directories to 777 by doing this:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 777 {} \;
chmod o+var/.htaccess
chmod 550 mage
 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 

Yes, I should have added that you should reset your permissions back:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod o+var var/.htaccess app/etc
chmod 550 mage
chmod 
-R o+w media

You will, however, need to update them again to use Magento Connect.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Submit Digital
Jr. Member
 
Avatar
Total Posts:  6
Joined:  2011-03-29
 

It worked.  HURRAY.

 
Magento Community Magento Community
Magento Community
Magento Community
 
slumbering
Jr. Member
 
Total Posts:  8
Joined:  2011-03-31
 

Hi,

I’ve tried to use the following command :

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod o+w var var/.htaccess app/etc
chmod 550 mage
chmod -R o+w media

But nothing really happen. I mean it’s like the command prompt is waiting for something else ?? I’m using putty as you can see on the attached picture. Help would be appreciated. Thanks

Image Attachments
putty.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
slumbering
Jr. Member
 
Total Posts:  8
Joined:  2011-03-31
 

Sorry my bad !!! it works

 
Magento Community Magento Community
Magento Community
Magento Community
 
kellyferreira
Jr. Member
 
Total Posts:  11
Joined:  2011-05-25
 
slumbering - 06 June 2011 09:26 AM

Sorry my bad !!! it works

how do i get that to run? where do i run it?????? please help thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shirokovskiy
Jr. Member
 
Avatar
Total Posts:  28
Joined:  2010-10-21
Russian Federation
 

hello all,

in my case (Ubuntu localhost + XAMPP 1.7.3a + Magento 1.5.1.0) any previous commands didn’t help me :(

So, I always like to find reason smile
And I found.

First of all be sure that your Apache has ‘write’-access to your root of project.
For example:
/var/www/data/magentocommerce/htroot/

It’s enough to set 775 for root directory if Apache in group with you.
Look at httpd.conf

User nobody
Group nogroup <--- change it for your group name [i.e. Group mygroup]

Restart Apache (don’t forget)

Then, you just need this command also:
chmod 775 downloader/

Refresh your Magento Connect page. Enjoy smile No red string anymore.

!!! DON’T SET 777 for everything in your project!!! This is bad idea.

P.S. my additional commands was:

chmod 775 ./
chmod 775 downloader/

P.P.S. Also look at file: /downloader/target.xml
I guess this directories must be writable for Apache.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Daniel Freitas
Jr. Member
 
Total Posts:  3
Joined:  2010-06-25
 

In my case (Ubuntu4.10 + PHP Version 5.3.2-1 + Magento 1.6.1.0)

1) In directory /var/www/your_site/
cd /var/www/your_site

2) Setting folder owner
sudo chown your_user_ftp:www-data -R public_html/

Look vim /etc/apache2/envvars
Group www-data

2.1) Adding user in group www-data
sudo adduser your_user_ftp www-data

3) Resetting File Permissions Magento

sudo find . -type f -exec chmod 644 {} \;
sudo find . -type d -exec chmod 755 {} \;
sudo chmod o+w var var/.htaccess app/etc
sudo chmod 550 lib/PEAR
sudo chmod -R o+w media

http://www.magentocommerce.com/wiki/groups/227/resetting_file_permissions

4) Adding directory permission for group www-data
sudo find . -type d -exec chmod 775 {} \;

4) Restart Apache (don’t forget)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Spelkopen
Jr. Member
 
Total Posts:  8
Joined:  2011-03-24
 

Hi folks,

Which directories need 777 permission on Magento 1.6.1 ?

thanks, Richard

 
Magento Community Magento Community
Magento Community
Magento Community
 
therealro
Sr. Member
 
Total Posts:  102
Joined:  2010-04-09
 
Spelkopen - 27 November 2011 06:34 AM

Hi folks,

Which directories need 777 permission on Magento 1.6.1 ?

thanks, Richard

The following is 100% safe to run from the directory where Magento is installed:

 
Magento Community Magento Community
Magento Community
Magento Community
 
Spelkopen
Jr. Member
 
Total Posts:  8
Joined:  2011-03-24
 

I don’t see anything in your reply…
via an admin tool, I can change the permissions per directory, I think I can’t run any code.

 
Magento Community Magento Community
Magento Community
Magento Community
 
therealro
Sr. Member
 
Total Posts:  102
Joined:  2010-04-09
 
\"Crucial\" -

The following is 100% safe to run from the directory where Magento is installed:

find . -type f -exec chmod 644 {} \\;
find . -type d -exec chmod 755 {} \\;
chmod o+var var/.htaccess app/etc
chmod 550 mage
chmod 
-R o+w media

If that is not working, try setting all directories to 777 by doing this:

find . -type f -exec chmod 644 {} \\;
find . -type d -exec chmod 777 {} \\;
chmod o+var/.htaccess
chmod 550 mage
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2