我正在安装Neo4j服务器作为一个Linux服务,但是当我安装它,我得到以下消息:
/sbin/insserv: Permission denied
这是什么? 我该怎么办? 我用sudo
运行所有的东西。
更新 – scheme :
我第一次正确安装了它,但后来我把neo4j目录移到了不同的位置。
neo4j服务现在不被识别。
我从/etc/init.d
删除了neo4j-service,然后运行update-rc.d -f neo4j-service remove
当我重新安装它说/sbin/insserv
没有这样的目录,所以我GOOGLE了,做到这一点:
ln -s /usr/lib/insserv/insserv /sbin/insserv
现在当我重新安装它 – 它说/sbin/insserv: Permission denied
使用Ubuntu 。
etc / sudoers :
# # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL:ALL) ALL # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d
neo4j安装脚本的权限:
-rwxr-xr-x 1 username username 15K Feb 27 09:38 neo4j
更新2 :
当我在/sbin
上执行ls -lah
时:
lrwxrwxrwx 1 root root 16 May 15 20:29 insserv -> /usr/lib/insserv
和/usr/lib
上的ls -lah
:
drwxr-xr-x 2 root root 4.0K Feb 14 03:37 insserv
rsuarez对你的init / upstartconfiguration有一些好的意见。 但是,如果以手动方式以root身份运行insserv
程序时遇到同样的错误,则不清楚。 有两件事你可以直接debugginginsserv
权限:
/sbin/insserv
命令是否在手动从命令行运行时出现相同的错误 strace
运行以查看失败的文件或权限。 如果#1没有给你拒绝的权限,那么按照rsuarez和@ TomO'Connor的指导来看看潜在的新贵或Neo4j问题,因为它可能与/sbin/insserv
二进制文件没有直接关系。