Can't open file even though directory/file is owned by user and in groupHow to configure permissions to allow...

Can more than one creature benefit from multiple Hunter's Mark spells cast on the same target?

What does this quote in Small Gods refer to?

Is there an application which does HTTP PUT?

Renting a house to a graduate student in my department

Exception propagation: When to catch exceptions?

Why was the ancient one so hesitant to teach Dr Strange the art of sorcery

Why does it take longer to fly from London to Xi'an than to Beijing

How is CoreiX like Corei5, i7 is related to Haswell, Ivy Bridge?

Are there variations of the regular runtimes of the Big-O-Notation?

Is this state of Earth possible, after humans left for a million years?

Is it nonsense to say B -> [A -> B]?

Why use steam instead of just hot air?

Why do the Avengers care about returning these items in Endgame?

Improving Sati-Sampajañña (situative wisdom)

How to slow yourself down (for playing nice with others)

Why are parallelograms defined as quadrilaterals? What term would encompass polygons with greater than two parallel pairs?

Intersecting with the x-axis / intersecting the x-axis

Is there a need for better software for writers?

Should I pay on student loans in deferment or continue to snowball other debts?

How to get my matrix to fit on the page

Noob at soldering, can anyone explain why my circuit wont work?

date to display the EDT time

Series that evaluates to different values upon changing order of summation

Why do protein solutions have to be alkalised in biuret test?



Can't open file even though directory/file is owned by user and in group


How to configure permissions to allow gedit, apache, and an IDE play together?Full access by group user of /var/www/htmlpostgresql service start issuesWhy root can't open pseudo terminal device? (permission denied)Why do I get “Permission Denied” errors even though I have group permission?Controlling ftp access with vsftpdCan Ubuntu 16.04 setup autofs to automount /media/autousb with read and write permissions if am user frank?User Can't Enter Directory Even Though Permissions are 777How to grant a user rights to change ownership of files/directories in a directoryPermissions Error






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







0















I am having a really tough time understand user/group permissions. I have spent hours reading and trying things. Here is what I have:



Directories Permissions



Input 1: ls -lhd



Output 1:



/var/log: drwxrwxr-x 11 root syslog 4.0K May 10 01:59 .



/var/log/mongosqld: drw-rw-r-- 2 mongosqld logstash 4.0K May 10 03:37 .



Note: I set this up using chown and chgrp.



File Permissions



Input 2: ls -lh



Output 2:



/var/log/mongosqld:



total 12K
-rw-rw-r-- 1 mongosqld logstash 1.4K May 10 03:43 mongosqld.log


Groups:



Input: groups logstash mongosqld



Output:



logstash : logstash
mongosqld : users logstash


My Question



When I try to open a file as the mongosqld user, it tells me open /var/log/mongosqld/mongosqld.log: permission denied. Please tell me where I am going wrong. It will be much appreciated.










share|improve this question







New contributor



Intrastellar Explorer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    0















    I am having a really tough time understand user/group permissions. I have spent hours reading and trying things. Here is what I have:



    Directories Permissions



    Input 1: ls -lhd



    Output 1:



    /var/log: drwxrwxr-x 11 root syslog 4.0K May 10 01:59 .



    /var/log/mongosqld: drw-rw-r-- 2 mongosqld logstash 4.0K May 10 03:37 .



    Note: I set this up using chown and chgrp.



    File Permissions



    Input 2: ls -lh



    Output 2:



    /var/log/mongosqld:



    total 12K
    -rw-rw-r-- 1 mongosqld logstash 1.4K May 10 03:43 mongosqld.log


    Groups:



    Input: groups logstash mongosqld



    Output:



    logstash : logstash
    mongosqld : users logstash


    My Question



    When I try to open a file as the mongosqld user, it tells me open /var/log/mongosqld/mongosqld.log: permission denied. Please tell me where I am going wrong. It will be much appreciated.










    share|improve this question







    New contributor



    Intrastellar Explorer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      0












      0








      0








      I am having a really tough time understand user/group permissions. I have spent hours reading and trying things. Here is what I have:



      Directories Permissions



      Input 1: ls -lhd



      Output 1:



      /var/log: drwxrwxr-x 11 root syslog 4.0K May 10 01:59 .



      /var/log/mongosqld: drw-rw-r-- 2 mongosqld logstash 4.0K May 10 03:37 .



      Note: I set this up using chown and chgrp.



      File Permissions



      Input 2: ls -lh



      Output 2:



      /var/log/mongosqld:



      total 12K
      -rw-rw-r-- 1 mongosqld logstash 1.4K May 10 03:43 mongosqld.log


      Groups:



      Input: groups logstash mongosqld



      Output:



      logstash : logstash
      mongosqld : users logstash


      My Question



      When I try to open a file as the mongosqld user, it tells me open /var/log/mongosqld/mongosqld.log: permission denied. Please tell me where I am going wrong. It will be much appreciated.










      share|improve this question







      New contributor



      Intrastellar Explorer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I am having a really tough time understand user/group permissions. I have spent hours reading and trying things. Here is what I have:



      Directories Permissions



      Input 1: ls -lhd



      Output 1:



      /var/log: drwxrwxr-x 11 root syslog 4.0K May 10 01:59 .



      /var/log/mongosqld: drw-rw-r-- 2 mongosqld logstash 4.0K May 10 03:37 .



      Note: I set this up using chown and chgrp.



      File Permissions



      Input 2: ls -lh



      Output 2:



      /var/log/mongosqld:



      total 12K
      -rw-rw-r-- 1 mongosqld logstash 1.4K May 10 03:43 mongosqld.log


      Groups:



      Input: groups logstash mongosqld



      Output:



      logstash : logstash
      mongosqld : users logstash


      My Question



      When I try to open a file as the mongosqld user, it tells me open /var/log/mongosqld/mongosqld.log: permission denied. Please tell me where I am going wrong. It will be much appreciated.







      ubuntu permissions chmod






      share|improve this question







      New contributor



      Intrastellar Explorer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question







      New contributor



      Intrastellar Explorer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question






      New contributor



      Intrastellar Explorer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 2 hours ago









      Intrastellar ExplorerIntrastellar Explorer

      11




      11




      New contributor



      Intrastellar Explorer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      Intrastellar Explorer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.
























          2 Answers
          2






          active

          oldest

          votes


















          0














          You can’t access anything in /var/log/mongosqld
          (unless you’re running as root)
          because it (the directory) doesn’t have any execute bits set.






          share|improve this answer































            0














            To open a file, I guess you mean you want to look at it's content.



            The open function is not what you want for that. Do man open or open -h to learn what open does.



            To look at a file you can do :




            • head or tail to look at it's first (last) lines


            • less (less is more) to look at it's content (it's a "pager")



            or you can edit it in an editor such as vim or emacs etc..






            share|improve this answer








            New contributor



            Samusz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.




















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "106"
              };
              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
              });


              }
              });






              Intrastellar Explorer is a new contributor. Be nice, and check out our Code of Conduct.










              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f518123%2fcant-open-file-even-though-directory-file-is-owned-by-user-and-in-group%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














              You can’t access anything in /var/log/mongosqld
              (unless you’re running as root)
              because it (the directory) doesn’t have any execute bits set.






              share|improve this answer




























                0














                You can’t access anything in /var/log/mongosqld
                (unless you’re running as root)
                because it (the directory) doesn’t have any execute bits set.






                share|improve this answer


























                  0












                  0








                  0







                  You can’t access anything in /var/log/mongosqld
                  (unless you’re running as root)
                  because it (the directory) doesn’t have any execute bits set.






                  share|improve this answer













                  You can’t access anything in /var/log/mongosqld
                  (unless you’re running as root)
                  because it (the directory) doesn’t have any execute bits set.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 1 hour ago









                  ScottScott

                  7,15052952




                  7,15052952

























                      0














                      To open a file, I guess you mean you want to look at it's content.



                      The open function is not what you want for that. Do man open or open -h to learn what open does.



                      To look at a file you can do :




                      • head or tail to look at it's first (last) lines


                      • less (less is more) to look at it's content (it's a "pager")



                      or you can edit it in an editor such as vim or emacs etc..






                      share|improve this answer








                      New contributor



                      Samusz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.
























                        0














                        To open a file, I guess you mean you want to look at it's content.



                        The open function is not what you want for that. Do man open or open -h to learn what open does.



                        To look at a file you can do :




                        • head or tail to look at it's first (last) lines


                        • less (less is more) to look at it's content (it's a "pager")



                        or you can edit it in an editor such as vim or emacs etc..






                        share|improve this answer








                        New contributor



                        Samusz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.






















                          0












                          0








                          0







                          To open a file, I guess you mean you want to look at it's content.



                          The open function is not what you want for that. Do man open or open -h to learn what open does.



                          To look at a file you can do :




                          • head or tail to look at it's first (last) lines


                          • less (less is more) to look at it's content (it's a "pager")



                          or you can edit it in an editor such as vim or emacs etc..






                          share|improve this answer








                          New contributor



                          Samusz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          To open a file, I guess you mean you want to look at it's content.



                          The open function is not what you want for that. Do man open or open -h to learn what open does.



                          To look at a file you can do :




                          • head or tail to look at it's first (last) lines


                          • less (less is more) to look at it's content (it's a "pager")



                          or you can edit it in an editor such as vim or emacs etc..







                          share|improve this answer








                          New contributor



                          Samusz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.








                          share|improve this answer



                          share|improve this answer






                          New contributor



                          Samusz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.








                          answered 1 hour ago









                          SamuszSamusz

                          1




                          1




                          New contributor



                          Samusz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.




                          New contributor




                          Samusz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.
























                              Intrastellar Explorer is a new contributor. Be nice, and check out our Code of Conduct.










                              draft saved

                              draft discarded


















                              Intrastellar Explorer is a new contributor. Be nice, and check out our Code of Conduct.













                              Intrastellar Explorer is a new contributor. Be nice, and check out our Code of Conduct.












                              Intrastellar Explorer is a new contributor. Be nice, and check out our Code of Conduct.
















                              Thanks for contributing an answer to Unix & Linux 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%2funix.stackexchange.com%2fquestions%2f518123%2fcant-open-file-even-though-directory-file-is-owned-by-user-and-in-group%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

                              Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                              Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                              Ciclooctatetraenă Vezi și | Bibliografie | Meniu de navigare637866text4148569-500570979m