Balazs Scheidler on Tue, Nov 14, 2000 at 11:17:45AM +0100: Hi,
now..when i start syslog-ng with umask 077, i get files generated as 0600 when i start with umask 022, i get files generated with as 0644. i though that perm and dir_perm were set while ignoring umask, this should be noted in the documentation if it uses umask as well.
umask is enforced by the kernel. syslog-ng doesn't use it, it simply issues chmod(file, perm), kernel masks bits found in umask.
On which UNIX and where can I get a copy? ;) I have only seen this type of mode enforcement on B1 systems. chmod() calls (except symbolic ones without "ugo" specification) will actually ignore umask settings. open() in turn, will not, and I guess that's why we are seeing what we see :) I'd have to look at the source, but I suspect something with the chmod being wrong. As far as I'm concerned, perm's that were specified explicitely should be in place regardless of the umask. I start all my daemons with 077, just in case they dump temporary stuff (e.g. cores) to disk that I don't want others to read, overwrite, whatever. I still might want to create output files with permissions appropriate to archive files or make them available for other legitimate users. Greetings, Gregor. -- Gregor Binder <gbinder@sysfive.com> http://www.sysfive.com/~gbinder/ sysfive.com GmbH UNIX. Networking. Security. Applications. Gaertnerstrasse 125b, 20253 Hamburg, Germany TEL +49-40-63647482