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

What exactly "triggers an additional time" in the interaction between Afterlife and Teysa Karlov?

Should I list a completely different profession in my technical resume?

one-hot-encoding categorical data gives error

What to bootstrap for hypothesis testing

A life of PhD: is it feasible?

Find all letter Combinations of a Phone Number

Can a Warforged suffer from magical exhaustion?

What is the logic behind charging tax _in the form of money_ for owning property when the property does not produce money?

Why do the TIE Fighter pilot helmets have similar ridges as the rebels?

In American Politics, why is the Justice Department under the President?

How to befriend someone who doesn't like to talk?

How do I type a hyphen in iOS 12?

What is Gilligan's full Name?

C++ logging library

Forgot passport for Alaska cruise (Anchorage to Vancouver)

What is the STRONGEST end-of-line knot to use if you want to use a steel-thimble at the end, so that you've got a steel-eyelet at the end of the line?

Why is the distribution of dark matter in a Galaxy different from the distribution of normal matter?

Are regulatory compliance checks performed within the EU bloc?

Why do I seem to lose data using this bash pipe construction?

What class is best to play when a level behind the rest of the party?

What's the best way to quit a job mostly because of money?

Is it true that "only photographers care about noise"?

ASCII Meme Arrow Generator

What is the theme of analysis?



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

483112




483112




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,260315




    2,260315












    • 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,109311




        1,109311













            Popular posts from this blog

            Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

            Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

            What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company