--- tuncfg.c 2011-10-01 00:34:32.622948018 -0300 +++ tuncfg.c-new 2011-10-01 00:34:03.475694389 -0300 @@ -98,8 +98,8 @@ if (getuid() != 0) errorf("tuncfg: must be run with superuser permissions\n"); - // lcok - fd = open(LOCK_PATH, O_CREAT); + // lock + fd = open(LOCK_PATH, O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (fd < 0) errorf("tuncfg: cannot open lock file %s -- %s\n", LOCK_PATH, strerror(errno));