Hi, I have the following line in syslog-ng.conf: destination router { file("/opt/syslog-ng/var/$YEAR/$MONTH/$YEAR$MONTH$DAY-$HOST" create_dirs(yes) perm(0644)); }; This creates automaticaly the directorys and changes the file-permissions to 644. But it only changes the permissions of the file, not of the directories. What can I do, that also the directories get 644? Regards Stefan
On Wed, Jun 26, 2002 at 10:51:01AM +0200, Stefan M. Brandl wrote:
But it only changes the permissions of the file, not of the directories. What can I do, that also the directories get 644?
Directories generally aren't useful without the execute bit set, at least for it's owner. What exactly are you trying to accomplish? -- "The first step is to decide what Internet services users need to access and limit their access to those services." - Jesson, Joseph [a senior analyst at Chevron Corp] as quoted in ComputerWorld 6/28/93
On Wed, Jun 26, 2002 at 11:06:26AM +0200, Nate Campi wrote:
On Wed, Jun 26, 2002 at 10:51:01AM +0200, Stefan M. Brandl wrote:
But it only changes the permissions of the file, not of the
directories.
What can I do, that also the directories get 644?
Directories generally aren't useful without the execute bit set, at least for it's owner.
What exactly are you trying to accomplish?
I want that everyone can read the logile. The file is 644, but the directory is 600, so no user beside root can read the logifle. Stefan
On Wed, Jun 26, 2002 at 11:12:03AM +0200, Stefan M. Brandl wrote:
On Wed, Jun 26, 2002 at 11:06:26AM +0200, Nate Campi wrote:
On Wed, Jun 26, 2002 at 10:51:01AM +0200, Stefan M. Brandl wrote:
But it only changes the permissions of the file, not of the
directories.
What can I do, that also the directories get 644?
Directories generally aren't useful without the execute bit set, at least for it's owner.
What exactly are you trying to accomplish?
I want that everyone can read the logile. The file is 644, but the directory is 600, so no user beside root can read the logifle.
OK, at first it seemed like you wanted to make the directory 600, but now it seems like you want the directory something more like 755. Is this correct? Use "dir_perm": destination times { file("/var/log/TIMES/$YEAR/$MONTH/$DAY/$HOST/$FACILITY$YEAR$MONTH$DAY" owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes)); }; -- "Clothes make the man. Naked people have little or no influence on society." - Samuel Clemens
On Wed, Jun 26, 2002 at 11:18:21AM +0200, Nate Campi wrote:
OK, at first it seemed like you wanted to make the directory 600, but now it seems like you want the directory something more like 755. Is this correct?
Yes, that's correct.
Use "dir_perm":
Great, that did the job. Thanks Stefan
participants (2)
-
Nate Campi
-
Stefan M. Brandl