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

Magento Connect Manager bad folder permissions
 
czepp
Jr. Member
 
Total Posts:  1
Joined:  2008-10-24
 

Which folders need 777 permisions?

My host doesnt allow me to see the apache userid from my chroot jail.

I have already done a chmod 777 to the following folders:
app/etc
var
var/import
media

what folders am I missing?

i am afraid to do a ‘chmod -R 777 www’

this chroot jail has a very limited set of commands that I can use.

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

Do this instead:

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

However, I should point out, if you’re running in an environment where PHP is running as an Apache module, you must use SSH to upgrade Magento or install an extension. See the following:

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

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

@Crucia: Wrong. You can upgrade Magento using the Connect Manager even if you are running mod_php as long as the web server has write permissions to the required files/folders.

@czepp: The ‘downloader’ directory also need write permissions. You can probably use the command provided by Crucial, just remember to reset your permissions when you are done with the upgrade. The following folders/files always need apache write permissions for Magento to work:

var + subdirectories
app/etc/use_cache.ser
media + subdirectories

PS: I have used ‘write permissions’ instead of chmod 777 in the above, because it depends on your server setup what mode you must use. The important thing is that the user ID your web server is running under has write permission to the above mentioned files.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 
Sindre|ProperHost - 28 October 2008 03:24 AM

@Crucia: Wrong. You can upgrade Magento using the Connect Manager even if you are running mod_php as long as the web server has write permissions to the required files/folders.

Yes, of course you can upgrade Magento with Magento Connect when PHP is an Apache module, but then all the files that it does upgrade are owned by user nobody. Use SSH instead, as I originally pointed out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
davidjustin
Jr. Member
 
Total Posts:  1
Joined:  2008-08-05
 
Sindre|ProperHost - 28 October 2008 03:24 AM

@Crucia: Wrong. You can upgrade Magento using the Connect Manager even if you are running mod_php as long as the web server has write permissions to the required files/folders.

@czepp: The ‘downloader’ directory also need write permissions. You can probably use the command provided by Crucial, just remember to reset your permissions when you are done with the upgrade. The following folders/files always need apache write permissions for Magento to work:

var + subdirectories
app/etc/use_cache.ser
media + subdirectories

PS: I have used ‘write permissions’ instead of chmod 777 in the above, because it depends on your server setup what mode you must use. The important thing is that the user ID your web server is running under has write permission to the above mentioned files.

I pretty much changed all my directories to 777… What is a good downgrade to put globally and which folders require a 777 all the time?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

Basically, the following files/folders require webserver writable permissions for normal Magento operation. Note: this does not necessarily mean 777 mode. It depends on the server config.

- var and all subfolders
- media
- app/etc/use_cache.ser

Other files can generally be set to 644 and directories to 755.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 
davidjustin - 14 November 2008 12:33 AM

What is a good downgrade to put globally and which folders require a 777 all the time?

This should work for most:

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

 
Magento Community Magento Community
Magento Community
Magento Community
 
SimpleHelixcom
Enthusiast
 
Avatar
Total Posts:  906
Joined:  2007-08-31
Huntsville, AL
 

@sindre

when running under mod_php and if you use magento connect to upgrade, then you’d need 777 or files owned to ‘nobody’, for practically your whole magento folder.

magento upgrades usually try to upgrade all the files in your magento folder i believe, all the way up to .htaccess

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

SimpleHelix: I know that. I was under the impression that ‘davidjustin’ wanted to reset the permissions after using Magento Connect and just keep the absolute necessary files web server writable. I believe the files/folders that I have listed are the only ones that require server write permissions for essential Magento functions to work. This is true regardless of server configuration (mod_php, suPHP, ..)

 
Magento Community Magento Community
Magento Community
Magento Community
 
bladesolutions
Jr. Member
 
Total Posts:  1
Joined:  2009-09-14
 

Running this file will set essential permissions…

File Attachments
magento-cleanup.php  (File Size: 3KB - Downloads: 1870)
 
Magento Community Magento Community
Magento Community
Magento Community
 
unfeasible
Sr. Member
 
Avatar
Total Posts:  94
Joined:  2008-03-03
New Zealand
 

dear mr bladesolutions, i want to have all your babies, thanks a bazillion!

 
Magento Community Magento Community
Magento Community
Magento Community
 
mrcoral
Jr. Member
 
Total Posts:  12
Joined:  2009-11-20
 

mr bladesolutions, if i had a vagina i’d have all your babies too. thanks!!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
optical
Member
 
Total Posts:  35
Joined:  2009-08-06
 

when i ran this, a bunch of “not permitted” errors showed up.  I wanted to see if this can help me with connect manager permission errors. 

bladesolutions - 21 October 2009 07:43 AM

Running this file will set essential permissions…

 
Magento Community Magento Community
Magento Community
Magento Community
 
consoletronic
Jr. Member
 
Total Posts:  3
Joined:  2010-07-08
 

Worked perfectly thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
albuka_rs
Jr. Member
 
Total Posts:  1
Joined:  2012-03-12
 

bladesolutions are the best one!!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top