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

installing/updating via Magento Connect | Extension File & Directory Permission Problem
 
xeont
Member
 
Total Posts:  36
Joined:  2011-01-29
 

Hi,

I need some expert suggestions,

Anything i install/update via Magento Connect change into

Extension Directory Permission - 0777
Extension File Permission - 0666

Any image upload via Magento “Upload Image” will change into file permisstion - 0777

Is this Normal? Why Magento doing this?

Please confirm

Regard,
Xeont

 
Magento Community Magento Community
Magento Community
Magento Community
 
xeont
Member
 
Total Posts:  36
Joined:  2011-01-29
 

Anyone experiencing this problem?

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

You can specify the permissions Magento will use after installing something through Magento Connect. Log into your Magento Connect Manager and click on Settings. Then select “Use custom permissions:” and set the following:

Folders: 755
Files: 644

I recommend these permissions for security, as 777 permissions can potentially be dangerous.

 
Magento Community Magento Community
Magento Community
Magento Community
 
xeont
Member
 
Total Posts:  36
Joined:  2011-01-29
 

Thank you SOO Much Sindre|ProperHost.

It really worked!!!!

This is a Magento Installation without any modification.

Do we have to change this setting after every Magento Installation. just wondering.

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

I am glad I could help! In the past at least, by default permissions would be reset to 777 by Magento so I am not surprised if that is still the case. I would prefer if Magento would not touch the permissions by default, though.

 
Magento Community Magento Community
Magento Community
Magento Community
 
xeont
Member
 
Total Posts:  36
Joined:  2011-01-29
 

Thanks to Sindre|ProperHost the Files and Directory Permission by Magento Connect being fixed. Ive noticed a another problem.

Any Product Image Upload via Magento store will create a Directory with 777 Permission

eg:
/media/catalog/product/z <- Directory with Permission 777

/media/catalog/product/z/o <- Directory with Permission 777 Again

Also the image file permission will be 777

eg:

/media/catalog/product/m/o/image.jpg <- File with Permission 777

Also in the Cache

/media/catalog/product/cache/1/thumbnail/66x/8df78eab33525d08d6f5fb23d27336e45/z <-Directory with permission 777

/media/catalog/product/cache/1/thumbnail/66x/8df78eab33525d08d6f5fb23d27336e45/z/o <-Directory with permission 777

/media/catalog/product/cache/1/thumbnail/66x/8df78eab33525d08d6f5fb23d27336e45/z/o/image.jpg < File with permission 666

Also in the inside /media/catalog/product/cache/1/ |image | image_small same issue.

Does anyone know how to fix this issue. without resetting Magento file permission via SSH or running magento-cleanup.php file every time update any product image?

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

How is PHP configured on your server? Does it run with suPHP or as a generic user such as “nobody”? To be able to use 755/644 permissions it is important that the web server and PHP process runs under the user of the file owner, or else it won’t have permissions to write to the cache, media upload folder, etc.

 
Magento Community Magento Community
Magento Community
Magento Community
 
xeont
Member
 
Total Posts:  36
Joined:  2011-01-29
 

Thank you very much for your reply Sindre|ProperHost

PHP runs as FCGI.

If i run magento-cleanup.php, it fixes all Directory 755 and File 644. Also website runs without any problem.

Problem is with new image uploads turn up as the above post by myself.

Because every time image upload and run magento-cleanup.php is not very practical. Is there anyway we can fix this issue?

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