Can not open,/var/log/cassandra/gc.log due to Permission denied
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
add a comment |
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
add a comment |
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
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
16.04 permissions java cassandra
edited Feb 5 '18 at 9:51
karel
59.2k13128151
59.2k13128151
asked Jan 25 '18 at 19:07
MikiBelavistaMikiBelavista
2842921
2842921
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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/
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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/
add a comment |
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/
add a comment |
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/
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/
answered 10 hours ago
Prashant ShubhamPrashant Shubham
261
261
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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