TrinityCore/TrinityCore — Issue #3523: Cannot create pid file
Author: serjs
Created: 2011-10-15 22:24:21+00:00
State: open

I try to use pid file in config, all exec of commands and daemons i'm doing as root:

My /var/run permissions:
root@vps00:/home/wowuser/wowserver/bin# ls -la /var/run/
total 40
drwxr-xr-x 5 root root 4096 Oct 15 22:22 .
drwxr-xr-x 13 root root 4096 Jan 1 2011 ..

strace of authserver:
epoll_create(1024) = 4
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
setrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
socketpair(PF_FILE, SOCK_STREAM, 0, [5, 6]) = 0
setsockopt(5, SOL_SOCKET, SO_RCVBUF, [65535], 4) = 0
setsockopt(6, SOL_SOCKET, SO_SNDBUF, [65535], 4) = 0
fcntl(5, F_SETFD, FD_CLOEXEC) = 0
fcntl(6, F_SETFD, FD_CLOEXEC) = 0
fcntl(5, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 5, {EPOLLIN, {u32=5, u64=5}}) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
open("\"/var/run/authserver.pid'", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 ENOENT (No such file or directory)
write(2, "Cannot create PID file \"/var/run"..., 50Cannot create PID file "/var/run/authserver.pid'.
) = 50
write(2, "\n", 1
) = 1
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(3, "2011-10-15 22:23:30 ERROR: Canno"..., 78) = 78
close(3) = 0
munmap(0x7f56d8b73000, 4096) = 0
close(4) = 0
close(5) = 0
close(6) = 0
exit_group(1) = ?

but why? /var/run is exist and permissions are ok, another daemons works fine with pid (sshd,syslog,crond)