Running Indexer gives Permission denied error [duplicate]Magento 2 folder/file permissionscommand line user does not have read and write permissions on generated directoryMagento 2.1 pub/static permissionWhy do i have to always run the commands to clean cache in Magento 2.1.8?Magento 2: CronJob bug? MySQL is always running at 30% usage and many php processes are runningProblem with CLIERROR MagentoFrameworkExceptionLocalizedException: Field title can't be empty in Model/Theme.php:337How to solve newly generated magento 2 file permission issue in ubantu 18.04?Magento2 Installation Error by 0%Magento 2: wrong permission generate in generated folderMagento 2 + Permissions issue in Ubntu 16.04

Bent spoke design wheels — feasible?

Do manufacturers try make their components as close to ideal ones as possible?

Pay as you go Or Oyster card

What can plausibly explain many of my very long and low-tech bridges?

What happens to foam insulation board after you pour concrete slab?

What is the purpose of building foundations?

Why is c4 bad when playing the London against a King's Indian?

How could a government be implemented in a virtual reality?

Avoiding cliches when writing gods

Are there cubesats in GEO?

C SIGINT signal in Linux

Can a magnetic field of an object be stronger than its gravity?

Will TSA allow me to carry a Continuous Positive Airway Pressure (CPAP)/sleep apnea device?

What happens if you do emergency landing on a US base in middle of the ocean?

Credit card offering 0.5 miles for every cent rounded up. Too good to be true?

Accidentally renamed tar.gz file to a non tar.gz file, will my file be messed up

Incremental Ranges!

Do adult Russians normally hand-write Cyrillic as cursive or as block letters?

What are the words for people who cause trouble believing they know better?

Importance sampling estimation of power function

Word for a small burst of laughter that can't be held back

Company did not petition for visa in a timely manner. Is asking me to work from overseas, but wants me to take a paycut

Dynamically loading CSS files based on URL or URI in PHP

How to supress loops in a digraph?



Running Indexer gives Permission denied error [duplicate]


Magento 2 folder/file permissionscommand line user does not have read and write permissions on generated directoryMagento 2.1 pub/static permissionWhy do i have to always run the commands to clean cache in Magento 2.1.8?Magento 2: CronJob bug? MySQL is always running at 30% usage and many php processes are runningProblem with CLIERROR MagentoFrameworkExceptionLocalizedException: Field title can't be empty in Model/Theme.php:337How to solve newly generated magento 2 file permission issue in ubantu 18.04?Magento2 Installation Error by 0%Magento 2: wrong permission generate in generated folderMagento 2 + Permissions issue in Ubntu 16.04






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








1
















This question already has an answer here:



  • Magento 2 folder/file permissions

    12 answers



I am trying to run indexer. but when i enter command CLI shows this error
http://prntscr.com/ntzzlt



also i always need to give permission to generated folder, Pub folder and Var Folder after running Setup Upgrade




sudo chmod 777 -R generated, pub, var











share|improve this question













marked as duplicate by sv3n, Jai, Muhammad Hasham, Shoaib Munir, saravanavelu May 28 at 4:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • You should follow this guide: devdocs.magento.com/guides/v2.3/install-gde/prereq/…. I'm pretty sure that's the correct solution.

    – Khoa TruongDinh
    May 27 at 16:07

















1
















This question already has an answer here:



  • Magento 2 folder/file permissions

    12 answers



I am trying to run indexer. but when i enter command CLI shows this error
http://prntscr.com/ntzzlt



also i always need to give permission to generated folder, Pub folder and Var Folder after running Setup Upgrade




sudo chmod 777 -R generated, pub, var











share|improve this question













marked as duplicate by sv3n, Jai, Muhammad Hasham, Shoaib Munir, saravanavelu May 28 at 4:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • You should follow this guide: devdocs.magento.com/guides/v2.3/install-gde/prereq/…. I'm pretty sure that's the correct solution.

    – Khoa TruongDinh
    May 27 at 16:07













1












1








1









This question already has an answer here:



  • Magento 2 folder/file permissions

    12 answers



I am trying to run indexer. but when i enter command CLI shows this error
http://prntscr.com/ntzzlt



also i always need to give permission to generated folder, Pub folder and Var Folder after running Setup Upgrade




sudo chmod 777 -R generated, pub, var











share|improve this question















This question already has an answer here:



  • Magento 2 folder/file permissions

    12 answers



I am trying to run indexer. but when i enter command CLI shows this error
http://prntscr.com/ntzzlt



also i always need to give permission to generated folder, Pub folder and Var Folder after running Setup Upgrade




sudo chmod 777 -R generated, pub, var






This question already has an answer here:



  • Magento 2 folder/file permissions

    12 answers







magento2






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 27 at 15:36









i_ali55i_ali55

478112




478112




marked as duplicate by sv3n, Jai, Muhammad Hasham, Shoaib Munir, saravanavelu May 28 at 4:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by sv3n, Jai, Muhammad Hasham, Shoaib Munir, saravanavelu May 28 at 4:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • You should follow this guide: devdocs.magento.com/guides/v2.3/install-gde/prereq/…. I'm pretty sure that's the correct solution.

    – Khoa TruongDinh
    May 27 at 16:07

















  • You should follow this guide: devdocs.magento.com/guides/v2.3/install-gde/prereq/…. I'm pretty sure that's the correct solution.

    – Khoa TruongDinh
    May 27 at 16:07
















You should follow this guide: devdocs.magento.com/guides/v2.3/install-gde/prereq/…. I'm pretty sure that's the correct solution.

– Khoa TruongDinh
May 27 at 16:07





You should follow this guide: devdocs.magento.com/guides/v2.3/install-gde/prereq/…. I'm pretty sure that's the correct solution.

– Khoa TruongDinh
May 27 at 16:07










2 Answers
2






active

oldest

votes


















1















sudo (Super User DO) command in Linux is generally used as a prefix of some command that only superuser are allowed to run.



If you prefix
“sudo” with any command, it will run that command with elevated
privileges or in other words allow a user with proper permissions to
execute a command as another user, such as the superuser. This is the
equivalent of “run as administrator” option in Windows. The option of
sudo lets us have multiple administrators.




Using sudo Try To Reindex :-



 sudo php bin/magento indexer:reindex





share|improve this answer

























  • i need permanent solution, why i need to use sudo always?

    – i_ali55
    May 27 at 15:39











  • It stands for “super user do!”..it will run that command with elevated privileges. Elevated privileges are required to perform certain administrative tasks.

    – Rk Rathod
    May 27 at 15:40












  • understand ????

    – Rk Rathod
    May 27 at 15:43











  • yes, but there must be any permanent sol,

    – i_ali55
    May 27 at 15:47











  • yes its per solution

    – Rk Rathod
    May 27 at 15:48


















1














Execute these commands as a root user



find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w +

find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws +


Set the ownership to Magento user and web user using



sudo chown -R <Magento user>:<web server group> .


The error which you are facing is due to wrong ownership. If you navigate to the specified folder and run ll you can find the ownership for the file is assigned to root user which is preventing from removing the generated files as Magento user.



Please at any case don't give 777 permission if so please revert it back.



Don't run any command as root user as it might cause the new static files to be created with root ownership which might prevent web user to access such files forcing you to provide 777 permission. So run Magento commands as Magento user.






share|improve this answer































    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1















    sudo (Super User DO) command in Linux is generally used as a prefix of some command that only superuser are allowed to run.



    If you prefix
    “sudo” with any command, it will run that command with elevated
    privileges or in other words allow a user with proper permissions to
    execute a command as another user, such as the superuser. This is the
    equivalent of “run as administrator” option in Windows. The option of
    sudo lets us have multiple administrators.




    Using sudo Try To Reindex :-



     sudo php bin/magento indexer:reindex





    share|improve this answer

























    • i need permanent solution, why i need to use sudo always?

      – i_ali55
      May 27 at 15:39











    • It stands for “super user do!”..it will run that command with elevated privileges. Elevated privileges are required to perform certain administrative tasks.

      – Rk Rathod
      May 27 at 15:40












    • understand ????

      – Rk Rathod
      May 27 at 15:43











    • yes, but there must be any permanent sol,

      – i_ali55
      May 27 at 15:47











    • yes its per solution

      – Rk Rathod
      May 27 at 15:48















    1















    sudo (Super User DO) command in Linux is generally used as a prefix of some command that only superuser are allowed to run.



    If you prefix
    “sudo” with any command, it will run that command with elevated
    privileges or in other words allow a user with proper permissions to
    execute a command as another user, such as the superuser. This is the
    equivalent of “run as administrator” option in Windows. The option of
    sudo lets us have multiple administrators.




    Using sudo Try To Reindex :-



     sudo php bin/magento indexer:reindex





    share|improve this answer

























    • i need permanent solution, why i need to use sudo always?

      – i_ali55
      May 27 at 15:39











    • It stands for “super user do!”..it will run that command with elevated privileges. Elevated privileges are required to perform certain administrative tasks.

      – Rk Rathod
      May 27 at 15:40












    • understand ????

      – Rk Rathod
      May 27 at 15:43











    • yes, but there must be any permanent sol,

      – i_ali55
      May 27 at 15:47











    • yes its per solution

      – Rk Rathod
      May 27 at 15:48













    1












    1








    1








    sudo (Super User DO) command in Linux is generally used as a prefix of some command that only superuser are allowed to run.



    If you prefix
    “sudo” with any command, it will run that command with elevated
    privileges or in other words allow a user with proper permissions to
    execute a command as another user, such as the superuser. This is the
    equivalent of “run as administrator” option in Windows. The option of
    sudo lets us have multiple administrators.




    Using sudo Try To Reindex :-



     sudo php bin/magento indexer:reindex





    share|improve this answer
















    sudo (Super User DO) command in Linux is generally used as a prefix of some command that only superuser are allowed to run.



    If you prefix
    “sudo” with any command, it will run that command with elevated
    privileges or in other words allow a user with proper permissions to
    execute a command as another user, such as the superuser. This is the
    equivalent of “run as administrator” option in Windows. The option of
    sudo lets us have multiple administrators.




    Using sudo Try To Reindex :-



     sudo php bin/magento indexer:reindex






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited May 27 at 15:59

























    answered May 27 at 15:38









    Rk RathodRk Rathod

    2,210315




    2,210315












    • i need permanent solution, why i need to use sudo always?

      – i_ali55
      May 27 at 15:39











    • It stands for “super user do!”..it will run that command with elevated privileges. Elevated privileges are required to perform certain administrative tasks.

      – Rk Rathod
      May 27 at 15:40












    • understand ????

      – Rk Rathod
      May 27 at 15:43











    • yes, but there must be any permanent sol,

      – i_ali55
      May 27 at 15:47











    • yes its per solution

      – Rk Rathod
      May 27 at 15:48

















    • i need permanent solution, why i need to use sudo always?

      – i_ali55
      May 27 at 15:39











    • It stands for “super user do!”..it will run that command with elevated privileges. Elevated privileges are required to perform certain administrative tasks.

      – Rk Rathod
      May 27 at 15:40












    • understand ????

      – Rk Rathod
      May 27 at 15:43











    • yes, but there must be any permanent sol,

      – i_ali55
      May 27 at 15:47











    • yes its per solution

      – Rk Rathod
      May 27 at 15:48
















    i need permanent solution, why i need to use sudo always?

    – i_ali55
    May 27 at 15:39





    i need permanent solution, why i need to use sudo always?

    – i_ali55
    May 27 at 15:39













    It stands for “super user do!”..it will run that command with elevated privileges. Elevated privileges are required to perform certain administrative tasks.

    – Rk Rathod
    May 27 at 15:40






    It stands for “super user do!”..it will run that command with elevated privileges. Elevated privileges are required to perform certain administrative tasks.

    – Rk Rathod
    May 27 at 15:40














    understand ????

    – Rk Rathod
    May 27 at 15:43





    understand ????

    – Rk Rathod
    May 27 at 15:43













    yes, but there must be any permanent sol,

    – i_ali55
    May 27 at 15:47





    yes, but there must be any permanent sol,

    – i_ali55
    May 27 at 15:47













    yes its per solution

    – Rk Rathod
    May 27 at 15:48





    yes its per solution

    – Rk Rathod
    May 27 at 15:48













    1














    Execute these commands as a root user



    find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w +

    find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws +


    Set the ownership to Magento user and web user using



    sudo chown -R <Magento user>:<web server group> .


    The error which you are facing is due to wrong ownership. If you navigate to the specified folder and run ll you can find the ownership for the file is assigned to root user which is preventing from removing the generated files as Magento user.



    Please at any case don't give 777 permission if so please revert it back.



    Don't run any command as root user as it might cause the new static files to be created with root ownership which might prevent web user to access such files forcing you to provide 777 permission. So run Magento commands as Magento user.






    share|improve this answer





























      1














      Execute these commands as a root user



      find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w +

      find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws +


      Set the ownership to Magento user and web user using



      sudo chown -R <Magento user>:<web server group> .


      The error which you are facing is due to wrong ownership. If you navigate to the specified folder and run ll you can find the ownership for the file is assigned to root user which is preventing from removing the generated files as Magento user.



      Please at any case don't give 777 permission if so please revert it back.



      Don't run any command as root user as it might cause the new static files to be created with root ownership which might prevent web user to access such files forcing you to provide 777 permission. So run Magento commands as Magento user.






      share|improve this answer



























        1












        1








        1







        Execute these commands as a root user



        find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w +

        find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws +


        Set the ownership to Magento user and web user using



        sudo chown -R <Magento user>:<web server group> .


        The error which you are facing is due to wrong ownership. If you navigate to the specified folder and run ll you can find the ownership for the file is assigned to root user which is preventing from removing the generated files as Magento user.



        Please at any case don't give 777 permission if so please revert it back.



        Don't run any command as root user as it might cause the new static files to be created with root ownership which might prevent web user to access such files forcing you to provide 777 permission. So run Magento commands as Magento user.






        share|improve this answer















        Execute these commands as a root user



        find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w +

        find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws +


        Set the ownership to Magento user and web user using



        sudo chown -R <Magento user>:<web server group> .


        The error which you are facing is due to wrong ownership. If you navigate to the specified folder and run ll you can find the ownership for the file is assigned to root user which is preventing from removing the generated files as Magento user.



        Please at any case don't give 777 permission if so please revert it back.



        Don't run any command as root user as it might cause the new static files to be created with root ownership which might prevent web user to access such files forcing you to provide 777 permission. So run Magento commands as Magento user.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited May 27 at 16:20

























        answered May 27 at 16:15









        Raj Mohan RRaj Mohan R

        1,083311




        1,083311













            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 거울 청소 군 추천하다 아이스크림