Can not open,/var/log/cassandra/gc.log due to Permission denied












2















What do /var/log files serve for?When I try to run cassandra on my Ubuntu 16.04



OpenJDK 64-Bit Server VM warning: Cannot open file /var/log/cassandra/gc.log due to Permission denied


Later



19:47:58,887 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - Active log file name: /var/log/cassandra/system.log
19:47:58,887 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - File property is set to [/var/log/cassandra/system.log]
19:47:58,889 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - openFile(/var/log/cassandra/system.log,true) call failed. java.io.FileNotFoundException: /var/log/cassandra/system.log (Permission denied)
at java.io.FileNotFoundException: /var/log/cassandra/system.log (Permission denied)


Why do I have these problems?
This is my java



java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)


These are the permissions



/var/log$ ls -la cassandra/
total 300
drwxr-xr-x 2 cassandra cassandra 4096 jan. 25 15:50 .
drwxrwxr-x 14 root syslog 4096 jan. 25 15:49 ..
-rw-r--r-- 1 cassandra cassandra 184448 jan. 25 19:50 debug.log
-rw-r--r-- 1 cassandra cassandra 59956 jan. 25 19:50 gc.log.0.current
-rw-r--r-- 1 cassandra cassandra 41363 jan. 25 19:50 system.log









share|improve this question





























    2















    What do /var/log files serve for?When I try to run cassandra on my Ubuntu 16.04



    OpenJDK 64-Bit Server VM warning: Cannot open file /var/log/cassandra/gc.log due to Permission denied


    Later



    19:47:58,887 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - Active log file name: /var/log/cassandra/system.log
    19:47:58,887 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - File property is set to [/var/log/cassandra/system.log]
    19:47:58,889 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - openFile(/var/log/cassandra/system.log,true) call failed. java.io.FileNotFoundException: /var/log/cassandra/system.log (Permission denied)
    at java.io.FileNotFoundException: /var/log/cassandra/system.log (Permission denied)


    Why do I have these problems?
    This is my java



    java -version
    openjdk version "1.8.0_151"
    OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
    OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)


    These are the permissions



    /var/log$ ls -la cassandra/
    total 300
    drwxr-xr-x 2 cassandra cassandra 4096 jan. 25 15:50 .
    drwxrwxr-x 14 root syslog 4096 jan. 25 15:49 ..
    -rw-r--r-- 1 cassandra cassandra 184448 jan. 25 19:50 debug.log
    -rw-r--r-- 1 cassandra cassandra 59956 jan. 25 19:50 gc.log.0.current
    -rw-r--r-- 1 cassandra cassandra 41363 jan. 25 19:50 system.log









    share|improve this question



























      2












      2








      2








      What do /var/log files serve for?When I try to run cassandra on my Ubuntu 16.04



      OpenJDK 64-Bit Server VM warning: Cannot open file /var/log/cassandra/gc.log due to Permission denied


      Later



      19:47:58,887 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - Active log file name: /var/log/cassandra/system.log
      19:47:58,887 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - File property is set to [/var/log/cassandra/system.log]
      19:47:58,889 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - openFile(/var/log/cassandra/system.log,true) call failed. java.io.FileNotFoundException: /var/log/cassandra/system.log (Permission denied)
      at java.io.FileNotFoundException: /var/log/cassandra/system.log (Permission denied)


      Why do I have these problems?
      This is my java



      java -version
      openjdk version "1.8.0_151"
      OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
      OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)


      These are the permissions



      /var/log$ ls -la cassandra/
      total 300
      drwxr-xr-x 2 cassandra cassandra 4096 jan. 25 15:50 .
      drwxrwxr-x 14 root syslog 4096 jan. 25 15:49 ..
      -rw-r--r-- 1 cassandra cassandra 184448 jan. 25 19:50 debug.log
      -rw-r--r-- 1 cassandra cassandra 59956 jan. 25 19:50 gc.log.0.current
      -rw-r--r-- 1 cassandra cassandra 41363 jan. 25 19:50 system.log









      share|improve this question
















      What do /var/log files serve for?When I try to run cassandra on my Ubuntu 16.04



      OpenJDK 64-Bit Server VM warning: Cannot open file /var/log/cassandra/gc.log due to Permission denied


      Later



      19:47:58,887 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - Active log file name: /var/log/cassandra/system.log
      19:47:58,887 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - File property is set to [/var/log/cassandra/system.log]
      19:47:58,889 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - openFile(/var/log/cassandra/system.log,true) call failed. java.io.FileNotFoundException: /var/log/cassandra/system.log (Permission denied)
      at java.io.FileNotFoundException: /var/log/cassandra/system.log (Permission denied)


      Why do I have these problems?
      This is my java



      java -version
      openjdk version "1.8.0_151"
      OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
      OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)


      These are the permissions



      /var/log$ ls -la cassandra/
      total 300
      drwxr-xr-x 2 cassandra cassandra 4096 jan. 25 15:50 .
      drwxrwxr-x 14 root syslog 4096 jan. 25 15:49 ..
      -rw-r--r-- 1 cassandra cassandra 184448 jan. 25 19:50 debug.log
      -rw-r--r-- 1 cassandra cassandra 59956 jan. 25 19:50 gc.log.0.current
      -rw-r--r-- 1 cassandra cassandra 41363 jan. 25 19:50 system.log






      16.04 permissions java cassandra






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 5 '18 at 9:51









      karel

      60k13129152




      60k13129152










      asked Jan 25 '18 at 19:07









      MikiBelavistaMikiBelavista

      2912921




      2912921






















          1 Answer
          1






          active

          oldest

          votes


















          1














          I was facing the same issue, fixed using following commands:



          sudo chown -R $USER:$GROUP /var/lib/cassandra/



          sudo chown -R $USER:$GROUP /var/log/cassandra/






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2faskubuntu.com%2fquestions%2f999834%2fcan-not-open-var-log-cassandra-gc-log-due-to-permission-denied%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            I was facing the same issue, fixed using following commands:



            sudo chown -R $USER:$GROUP /var/lib/cassandra/



            sudo chown -R $USER:$GROUP /var/log/cassandra/






            share|improve this answer




























              1














              I was facing the same issue, fixed using following commands:



              sudo chown -R $USER:$GROUP /var/lib/cassandra/



              sudo chown -R $USER:$GROUP /var/log/cassandra/






              share|improve this answer


























                1












                1








                1







                I was facing the same issue, fixed using following commands:



                sudo chown -R $USER:$GROUP /var/lib/cassandra/



                sudo chown -R $USER:$GROUP /var/log/cassandra/






                share|improve this answer













                I was facing the same issue, fixed using following commands:



                sudo chown -R $USER:$GROUP /var/lib/cassandra/



                sudo chown -R $USER:$GROUP /var/log/cassandra/







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 11 at 17:55









                Prashant ShubhamPrashant Shubham

                261




                261






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • 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%2faskubuntu.com%2fquestions%2f999834%2fcan-not-open-var-log-cassandra-gc-log-due-to-permission-denied%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

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                     ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕