Unable to delete Magento 2.0.7 image cacheMagento 2.1.1 upgrade issueMagento 2.0.2 Product image upload errorWarning: imagejpeg 'Failed to open stream' on product update Magento 2Cronjob started rollback and files were deleted. Why?masgento 2.1 - How to get the full path of the cached image thumbnails in RESTMagento 2 Modified Product Cache file not being usedMagento2 product image path issueMagento Product Images in CacheCache problem old images - Magento 1.9Magento 2.3.0 product image cache resizing images

Buliding a larger matrix from a smaller one

Golf the smallest circle!

What's the safest way to inform a new user of their password on an invite-only website?

Just graduated with a master’s degree, but I internalised nothing

Donkey as Democratic Party symbolic animal

Pairwise Scatter Plots with Histograms and Correlations

Who voices the character "Finger" in The Fifth Element?

Is it legal to call shared_future::get() multiple times on the same instance in the same thread?

I hit a pipe with a mower and now it won't turn

Chords behaving as a melody

Picking balls from urns.

Do the 26 richest billionaires own as much wealth as the poorest 3.8 billion people?

One folder having two different locations on Ubuntu 18.04

What exactly did Ant-Man see that made him say that their plan worked?

What does the phrase "building hopping chop" mean here?

What could a reptilian race tell by candling their eggs?

Symbol for "not absolutely continuous" in Latex

How did researchers find articles before the Internet and the computer era?

Could human civilization live 150 years in a nuclear-powered aircraft carrier colony without resorting to mass killing/ cannibalism?

Matrix decomposition

Why do we use a cylinder as a Gaussian surface for infinitely long charged wire?

Is it possible for Leomund's Tiny Hut to be lifted?

What was the impact of Fischer vs. Spassky 1972 on the relationship between the USA and the Soviet Union?

Boolean Difference with Offset?



Unable to delete Magento 2.0.7 image cache


Magento 2.1.1 upgrade issueMagento 2.0.2 Product image upload errorWarning: imagejpeg 'Failed to open stream' on product update Magento 2Cronjob started rollback and files were deleted. Why?masgento 2.1 - How to get the full path of the cached image thumbnails in RESTMagento 2 Modified Product Cache file not being usedMagento2 product image path issueMagento Product Images in CacheCache problem old images - Magento 1.9Magento 2.3.0 product image cache resizing images






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















When I try to Flush catalog images cache I get the following error



The file




/home/shaffersuiting/public_html/project/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/i/n/inqalab_final_colour_08.jpg




Cannot be deleted




Warning!unlink(/home/shaffersuiting/public_html/project/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/i/n/inqalab_final_colour_08.jpg):
Permission denied




All my folders/files have 775 permission



Help required urgently










share|improve this question






























    1















    When I try to Flush catalog images cache I get the following error



    The file




    /home/shaffersuiting/public_html/project/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/i/n/inqalab_final_colour_08.jpg




    Cannot be deleted




    Warning!unlink(/home/shaffersuiting/public_html/project/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/i/n/inqalab_final_colour_08.jpg):
    Permission denied




    All my folders/files have 775 permission



    Help required urgently










    share|improve this question


























      1












      1








      1








      When I try to Flush catalog images cache I get the following error



      The file




      /home/shaffersuiting/public_html/project/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/i/n/inqalab_final_colour_08.jpg




      Cannot be deleted




      Warning!unlink(/home/shaffersuiting/public_html/project/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/i/n/inqalab_final_colour_08.jpg):
      Permission denied




      All my folders/files have 775 permission



      Help required urgently










      share|improve this question
















      When I try to Flush catalog images cache I get the following error



      The file




      /home/shaffersuiting/public_html/project/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/i/n/inqalab_final_colour_08.jpg




      Cannot be deleted




      Warning!unlink(/home/shaffersuiting/public_html/project/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/i/n/inqalab_final_colour_08.jpg):
      Permission denied




      All my folders/files have 775 permission



      Help required urgently







      magento2 cache permissions






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 19 at 11:17









      Chirag Patel

      3,5236 silver badges28 bronze badges




      3,5236 silver badges28 bronze badges










      asked Jan 13 '18 at 19:57









      Mahib BukhariMahib Bukhari

      62 bronze badges




      62 bronze badges




















          2 Answers
          2






          active

          oldest

          votes


















          0














          Check permissions and ownership of this exact file:




          /home/shaffersuiting/public_html/project/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/i/n/inqalab_final_colour_08.jpg




          Try deleting it manually and clearing image cache again.



          It you can't delete it manually, I presume 2 situation might have caused such behaviour:



          1. you deployed static files with root privilages - so all files in your /pub/ folder have root owner and can't be deleted by the Magento file system owner.


          2. Your web server is missconfigured so the Magento file system owner doesn't have write permissions on these files - in this situation as a quick fix you'd need to give 777 permission to all your files, which is a bad idea overall.


          The 1st situation is more likely, so you'd need to run:



          sudo chown file_system_owner:file_system_owner /home/shaffersuiting/public_html/project/pub/ -R


          Where "file_system_owner" is the owner of Magento root.






          share|improve this answer























          • I can delete them manually, but when i refresh the folder from Cpanel they appear again ... any thoughts on that?

            – Mahib Bukhari
            Jan 13 '18 at 21:03











          • That's just a visual bug in cpanel. You didn't actually delete the file, since you don't have permissions to do so. If you have access to the command line, you should try the command I mentioned.

            – Lez
            Jan 13 '18 at 21:06











          • I did it and now i'm getting this errorFatal error: Uncaught Zend_Cache_Exception: cache_dir "/home/shaffersuiting/public_html/project/var/page_cache" is not writable in /home/shaffersuiting/public_html/project/vendor/magento/zendframework1/library/Zend/Cache.php:209 Stack trace: #0

            – Mahib Bukhari
            Jan 13 '18 at 21:08












          • Fixed ... i defined the wrong user name in command ... after changing it with right user name the issue is resolved ... Thanks

            – Mahib Bukhari
            Jan 13 '18 at 21:35











          • No problem, glad I could help

            – Lez
            Jan 13 '18 at 21:36


















          0














          It is happened due to permission issue. change the permission by using below command.



          sudo chmod -R 777 .





          share|improve this answer

























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f209382%2funable-to-delete-magento-2-0-7-image-cache%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Check permissions and ownership of this exact file:




            /home/shaffersuiting/public_html/project/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/i/n/inqalab_final_colour_08.jpg




            Try deleting it manually and clearing image cache again.



            It you can't delete it manually, I presume 2 situation might have caused such behaviour:



            1. you deployed static files with root privilages - so all files in your /pub/ folder have root owner and can't be deleted by the Magento file system owner.


            2. Your web server is missconfigured so the Magento file system owner doesn't have write permissions on these files - in this situation as a quick fix you'd need to give 777 permission to all your files, which is a bad idea overall.


            The 1st situation is more likely, so you'd need to run:



            sudo chown file_system_owner:file_system_owner /home/shaffersuiting/public_html/project/pub/ -R


            Where "file_system_owner" is the owner of Magento root.






            share|improve this answer























            • I can delete them manually, but when i refresh the folder from Cpanel they appear again ... any thoughts on that?

              – Mahib Bukhari
              Jan 13 '18 at 21:03











            • That's just a visual bug in cpanel. You didn't actually delete the file, since you don't have permissions to do so. If you have access to the command line, you should try the command I mentioned.

              – Lez
              Jan 13 '18 at 21:06











            • I did it and now i'm getting this errorFatal error: Uncaught Zend_Cache_Exception: cache_dir "/home/shaffersuiting/public_html/project/var/page_cache" is not writable in /home/shaffersuiting/public_html/project/vendor/magento/zendframework1/library/Zend/Cache.php:209 Stack trace: #0

              – Mahib Bukhari
              Jan 13 '18 at 21:08












            • Fixed ... i defined the wrong user name in command ... after changing it with right user name the issue is resolved ... Thanks

              – Mahib Bukhari
              Jan 13 '18 at 21:35











            • No problem, glad I could help

              – Lez
              Jan 13 '18 at 21:36















            0














            Check permissions and ownership of this exact file:




            /home/shaffersuiting/public_html/project/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/i/n/inqalab_final_colour_08.jpg




            Try deleting it manually and clearing image cache again.



            It you can't delete it manually, I presume 2 situation might have caused such behaviour:



            1. you deployed static files with root privilages - so all files in your /pub/ folder have root owner and can't be deleted by the Magento file system owner.


            2. Your web server is missconfigured so the Magento file system owner doesn't have write permissions on these files - in this situation as a quick fix you'd need to give 777 permission to all your files, which is a bad idea overall.


            The 1st situation is more likely, so you'd need to run:



            sudo chown file_system_owner:file_system_owner /home/shaffersuiting/public_html/project/pub/ -R


            Where "file_system_owner" is the owner of Magento root.






            share|improve this answer























            • I can delete them manually, but when i refresh the folder from Cpanel they appear again ... any thoughts on that?

              – Mahib Bukhari
              Jan 13 '18 at 21:03











            • That's just a visual bug in cpanel. You didn't actually delete the file, since you don't have permissions to do so. If you have access to the command line, you should try the command I mentioned.

              – Lez
              Jan 13 '18 at 21:06











            • I did it and now i'm getting this errorFatal error: Uncaught Zend_Cache_Exception: cache_dir "/home/shaffersuiting/public_html/project/var/page_cache" is not writable in /home/shaffersuiting/public_html/project/vendor/magento/zendframework1/library/Zend/Cache.php:209 Stack trace: #0

              – Mahib Bukhari
              Jan 13 '18 at 21:08












            • Fixed ... i defined the wrong user name in command ... after changing it with right user name the issue is resolved ... Thanks

              – Mahib Bukhari
              Jan 13 '18 at 21:35











            • No problem, glad I could help

              – Lez
              Jan 13 '18 at 21:36













            0












            0








            0







            Check permissions and ownership of this exact file:




            /home/shaffersuiting/public_html/project/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/i/n/inqalab_final_colour_08.jpg




            Try deleting it manually and clearing image cache again.



            It you can't delete it manually, I presume 2 situation might have caused such behaviour:



            1. you deployed static files with root privilages - so all files in your /pub/ folder have root owner and can't be deleted by the Magento file system owner.


            2. Your web server is missconfigured so the Magento file system owner doesn't have write permissions on these files - in this situation as a quick fix you'd need to give 777 permission to all your files, which is a bad idea overall.


            The 1st situation is more likely, so you'd need to run:



            sudo chown file_system_owner:file_system_owner /home/shaffersuiting/public_html/project/pub/ -R


            Where "file_system_owner" is the owner of Magento root.






            share|improve this answer













            Check permissions and ownership of this exact file:




            /home/shaffersuiting/public_html/project/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/i/n/inqalab_final_colour_08.jpg




            Try deleting it manually and clearing image cache again.



            It you can't delete it manually, I presume 2 situation might have caused such behaviour:



            1. you deployed static files with root privilages - so all files in your /pub/ folder have root owner and can't be deleted by the Magento file system owner.


            2. Your web server is missconfigured so the Magento file system owner doesn't have write permissions on these files - in this situation as a quick fix you'd need to give 777 permission to all your files, which is a bad idea overall.


            The 1st situation is more likely, so you'd need to run:



            sudo chown file_system_owner:file_system_owner /home/shaffersuiting/public_html/project/pub/ -R


            Where "file_system_owner" is the owner of Magento root.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jan 13 '18 at 20:37









            LezLez

            1,5508 silver badges31 bronze badges




            1,5508 silver badges31 bronze badges












            • I can delete them manually, but when i refresh the folder from Cpanel they appear again ... any thoughts on that?

              – Mahib Bukhari
              Jan 13 '18 at 21:03











            • That's just a visual bug in cpanel. You didn't actually delete the file, since you don't have permissions to do so. If you have access to the command line, you should try the command I mentioned.

              – Lez
              Jan 13 '18 at 21:06











            • I did it and now i'm getting this errorFatal error: Uncaught Zend_Cache_Exception: cache_dir "/home/shaffersuiting/public_html/project/var/page_cache" is not writable in /home/shaffersuiting/public_html/project/vendor/magento/zendframework1/library/Zend/Cache.php:209 Stack trace: #0

              – Mahib Bukhari
              Jan 13 '18 at 21:08












            • Fixed ... i defined the wrong user name in command ... after changing it with right user name the issue is resolved ... Thanks

              – Mahib Bukhari
              Jan 13 '18 at 21:35











            • No problem, glad I could help

              – Lez
              Jan 13 '18 at 21:36

















            • I can delete them manually, but when i refresh the folder from Cpanel they appear again ... any thoughts on that?

              – Mahib Bukhari
              Jan 13 '18 at 21:03











            • That's just a visual bug in cpanel. You didn't actually delete the file, since you don't have permissions to do so. If you have access to the command line, you should try the command I mentioned.

              – Lez
              Jan 13 '18 at 21:06











            • I did it and now i'm getting this errorFatal error: Uncaught Zend_Cache_Exception: cache_dir "/home/shaffersuiting/public_html/project/var/page_cache" is not writable in /home/shaffersuiting/public_html/project/vendor/magento/zendframework1/library/Zend/Cache.php:209 Stack trace: #0

              – Mahib Bukhari
              Jan 13 '18 at 21:08












            • Fixed ... i defined the wrong user name in command ... after changing it with right user name the issue is resolved ... Thanks

              – Mahib Bukhari
              Jan 13 '18 at 21:35











            • No problem, glad I could help

              – Lez
              Jan 13 '18 at 21:36
















            I can delete them manually, but when i refresh the folder from Cpanel they appear again ... any thoughts on that?

            – Mahib Bukhari
            Jan 13 '18 at 21:03





            I can delete them manually, but when i refresh the folder from Cpanel they appear again ... any thoughts on that?

            – Mahib Bukhari
            Jan 13 '18 at 21:03













            That's just a visual bug in cpanel. You didn't actually delete the file, since you don't have permissions to do so. If you have access to the command line, you should try the command I mentioned.

            – Lez
            Jan 13 '18 at 21:06





            That's just a visual bug in cpanel. You didn't actually delete the file, since you don't have permissions to do so. If you have access to the command line, you should try the command I mentioned.

            – Lez
            Jan 13 '18 at 21:06













            I did it and now i'm getting this errorFatal error: Uncaught Zend_Cache_Exception: cache_dir "/home/shaffersuiting/public_html/project/var/page_cache" is not writable in /home/shaffersuiting/public_html/project/vendor/magento/zendframework1/library/Zend/Cache.php:209 Stack trace: #0

            – Mahib Bukhari
            Jan 13 '18 at 21:08






            I did it and now i'm getting this errorFatal error: Uncaught Zend_Cache_Exception: cache_dir "/home/shaffersuiting/public_html/project/var/page_cache" is not writable in /home/shaffersuiting/public_html/project/vendor/magento/zendframework1/library/Zend/Cache.php:209 Stack trace: #0

            – Mahib Bukhari
            Jan 13 '18 at 21:08














            Fixed ... i defined the wrong user name in command ... after changing it with right user name the issue is resolved ... Thanks

            – Mahib Bukhari
            Jan 13 '18 at 21:35





            Fixed ... i defined the wrong user name in command ... after changing it with right user name the issue is resolved ... Thanks

            – Mahib Bukhari
            Jan 13 '18 at 21:35













            No problem, glad I could help

            – Lez
            Jan 13 '18 at 21:36





            No problem, glad I could help

            – Lez
            Jan 13 '18 at 21:36













            0














            It is happened due to permission issue. change the permission by using below command.



            sudo chmod -R 777 .





            share|improve this answer



























              0














              It is happened due to permission issue. change the permission by using below command.



              sudo chmod -R 777 .





              share|improve this answer

























                0












                0








                0







                It is happened due to permission issue. change the permission by using below command.



                sudo chmod -R 777 .





                share|improve this answer













                It is happened due to permission issue. change the permission by using below command.



                sudo chmod -R 777 .






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 14 '18 at 7:20









                Pramod KharadePramod Kharade

                1,88213 silver badges29 bronze badges




                1,88213 silver badges29 bronze badges



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f209382%2funable-to-delete-magento-2-0-7-image-cache%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

                    Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

                    Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림