如何在Linux Ubuntu上为Cassandra配置访问权限 [英] How to configure access permissions for Cassandra on Linux Ubuntu

查看:157
本文介绍了如何在Linux Ubuntu上为Cassandra配置访问权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谢谢您阅读本文。我在本教程中与安装Cassandra有关的步骤停留在第三步: http://wiki.apache .org / cassandra / GettingStarted#Step_3:_Start_Cassandra

Thank-you for reading this. I am stuck at step three on this tutorial pertaining to installing Cassandra: http://wiki.apache.org/cassandra/GettingStarted#Step_3:_Start_Cassandra

我只能以root用户身份运行此软件。 (为虚构的直升机噪音大声疾呼)这似乎是运行该软件的一种糟糕方法。

I can only run this software as root. (shouting this over fictional helicopter noise) This seem like a terrible way to run the software.

以普通用户身份启动Cassandra服务器时,出现以下错误:

When starting the Cassandra server as my normal user I receive the following errors:

1。) 15:46:00,147 | -ch.qos.logback.core.rolling.RollingFileAppender [FILE]中的错误-openFile(/var/log/cassandra/system.log,true)调用失败。 java.io.FileNotFoundException:/var/log/cassandra/system.log(权限被拒绝)

2。)错误20:46:00没有对/ var / lib / cassandra / data目录的写权限

我尝试更改权限几次,没有任何效果。我尝试更改 cassandra 组的 /var/log/cassandra/system.log 读/写权限。操作系统(OS)。我用来执行此操作的命令是 sudo chmod 664 /var/log/cassandra/system.log 。我发现此页面有助于确定如何更改权限: http:// www .linux.org / threads / file-permissions-chmod.4094 /

I tried changing the permissions several times and nothing has worked. I tried changing the /var/log/cassandra/system.log permissions for read/write for the cassandra group on the operating-system (OS). The command I used to do this was, sudo chmod 664 /var/log/cassandra/system.log. I found this page helpful in determining how to change the permissions:http://www.linux.org/threads/file-permissions-chmod.4094/

然后,我将用户名添加到 cassandra 组。根据我的理解,以用户身份运行 / usr / sbin / cassandra -f 命令应该允许我访问 / var / log / cassandra / system .log 文件,该文件将解决其中一个错误,即上面的错误编号1。

Then, I added my user-name to the cassandra group. From my understanding running the /usr/sbin/cassandra -f command as my user should allow me to access the /var/log/cassandra/system.log file, which would solve one of the errors, error number 1 above.

恭喜,

用户

推荐答案

我找到了解决方案!我运行 sudo -u cassandra / usr / sbin / cassandra -f ,然后遇到 commitlog 目录Phact的问题在他的回答中提到。然后,我运行Phact的递归chown命令, sudo chown -R cassandra:cassandra / var / lib / cassandra / commitlog ,Cassandra服务器正确启动,就像我以root用户身份运行该程序。 :D:D:D

I found a solution! I ran sudo -u cassandra /usr/sbin/cassandra -f and then ran into problems with the commitlog directory Phact mentions in his answer. I then ran Phact's recursive chown command, sudo chown -R cassandra:cassandra /var/lib/cassandra/commitlog and the Cassandra server started up correctly just as it would if I was running the program as the root user. :D :D :D

这篇关于如何在Linux Ubuntu上为Cassandra配置访问权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆