Linux-权限被拒绝?

我正在安装Neo4j服务器作为一个Linux服务,但是当我安装它,我得到以下消息:

/sbin/insserv: Permission denied 

这是什么? 我该怎么办? 我用sudo运行所有的东西。

更新 – scheme

  1. 我第一次正确安装了它,但后来我把neo4j目录移到了不同​​的位置。

  2. neo4j服务现在不被识别。

  3. 我从/etc/init.d删除了neo4j-service,然后运行update-rc.d -f neo4j-service remove

  4. 当我重新安装它说/sbin/insserv没有这样的目录,所以我GOOGLE了,做到这一点:

    ln -s /usr/lib/insserv/insserv /sbin/insserv

  5. 现在当我重新安装它 – 它说/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权限:

  1. 查看/sbin/insserv命令是否在手动从命令行运行时出现相同的错误
  2. 如果您获得了#1拒绝的相同权限,请尝试使用strace运行以查看失败的文件或权限。 如果#1没有给你拒绝的权限,那么按照rsuarez和@ TomO'Connor的指导来看看潜在的新贵或Neo4j问题,因为它可能与/sbin/insserv二进制文件没有直接关系。