Centos xinetd-无法写入文件
运行CentOS。xinetd.d/clhtest条目如下:Centos xinetd-无法写入文件,centos,file-permissions,xinetd,Centos,File Permissions,Xinetd,运行CentOS。xinetd.d/clhtest条目如下: service clhtest { disable = no port = 8020 socket_type = stream protocol = tcp wait = no u
service clhtest
{
disable = no
port = 8020
socket_type = stream
protocol = tcp
wait = no
user = charrison
passenv = PATH
server = /home/charrison/bin/clhtest
}
在调试时,我需要写入一个文件。我将服务器进程设置为打开/home/charrison/log/foo.txt
,这是第一步(注意user=charrison),但它没有打开,我假设它会尝试打开。当我从命令行启动服务器程序时,它成功地打开了文件
我怀疑可能需要umask参数,但我不知道它默认值是什么
有什么提示吗?您可以将服务器设置为一个简单的shell脚本,该脚本涉及
/tmp/foo
?这将告诉您用户名、组和umask。这是一个好主意,但不起作用。不知道xinetd是否缓存了指向服务器的指针,并且没有调用shell脚本,或者脚本是否无法访问。疯狂制作。您是否重新启动或启动inetd以读取更新的配置文件?我通常会这样做:killall-HUP xinetd