我正在致力于一个需要加载两个实例(一个隐藏服务和一个中继)的tor服务器。 当我'使用一个情况下,它的正常工作......但我this tutorial对PID无法打开“/var/run/tor/tor0.pid”进行写入:多个实例后权限被拒绝
随着它的正常工作i'havent允许的任何问题,原来的守护进程权限问题...
但是,如果使用this one其补充一点:
# --- Multi-instance init ---
config="/etc/tor"
arrrgs="$ARGS"
command=$1
shift
instances=$*
instances() {
case $instances in
"")
for c in $config/*.cfg
do
base=${c##*/}
test -f "$c" && echo ${base%.cfg}
done
;;
*)
echo "$instances"
;;
esac
}
case "$command" in
start|stop|restart|reload|force-reload|status)
highest=0
for i in $(instances)
do
NAME=$i
DESC=$i
TORPID="$TORPIDDIR/$i.pid"
ARGS="$arrrgs -f $config/$i.cfg"
execute $command
status=$?
test $status -gt $highest && highest=$status
done
exit $highest
;;
*)
execute
exit 1
;;
esac
我在通知0/1.登录
16年9月29日误差:47 1:10.000 [提醒]无法打开“/ var/run中/符/ tor0.pid“写入:权限被拒绝
因此,我不能停止tor的实例...怎么可能?如何改正它?是什么关于第一守护进程(原来的)和新之间权限的差异...
非常感谢事先通过
编辑:
如果在配置我有PIDFILE/VAR /run/tor/tor.pid它的工作没有权限问题,但如果我有PidFile /var/run/tor/tor0.pid权限错误...什么?
/变种/运行/ TOR的权限为:drwx - S - 2的debian-TOR的debian-TOR 80 09月29日17:24 TOR – Debroglie
什么用户拥有每个PID的文件?也许tor0.pid被root或其他用户所拥有?要手动停止它,只需以root身份运行'kill -3 xxx',其中xxx是要停止的Tor进程的PID。然后以root身份删除它没有写入权限的PID文件。 – drew010
目录中没有tor0.pid文件:(。谢谢 – Debroglie