Unix administration - Re: Possible to force ALL files created in a specific directory to include g+w ?

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > January 2004 > Re: Possible to force ALL files created in a specific directory to include g+w ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Possible to force ALL files created in a specific directory to include g+w ?
Jeremiah DeWitt Weiner

2004-01-23, 4:47 pm

noone <noone@noone.org> wrote:
quote:

> ... because the log files are owned by john and not joe, and the
> group-ownership is read-only, the application won't start. The log files
> are actually created by Apache Log4J.


quote:

> So question is, is there a way to force files that are ___created__ in a
> specific directory to have g+w ??



In general, no, but one thing you can do is ensure that the files
are created first and given group-write permission before you start up the
app that uses them. Then - assuming your app does not do stuff like remove
and recreate its log files - you'll be OK. Any log-rotation program will
have to take this into account, of course.

Using sudo to run the app as a single standard user isn't bad
either, although in my experience, you'll never get everybody to remember
this all the time, and some idiot will start the app as root, and then the
next guy who tries to start it correctly will wonder why stuff doesn't
work, etc.

JDW

Jeremiah DeWitt Weiner

2004-01-23, 4:56 pm

noone <noone@noone.org> wrote:
quote:

> ... because the log files are owned by john and not joe, and the
> group-ownership is read-only, the application won't start. The log files
> are actually created by Apache Log4J.


quote:

> So question is, is there a way to force files that are ___created__ in a
> specific directory to have g+w ??



In general, no, but one thing you can do is ensure that the files
are created first and given group-write permission before you start up the
app that uses them. Then - assuming your app does not do stuff like remove
and recreate its log files - you'll be OK. Any log-rotation program will
have to take this into account, of course.

Using sudo to run the app as a single standard user isn't bad
either, although in my experience, you'll never get everybody to remember
this all the time, and some idiot will start the app as root, and then the
next guy who tries to start it correctly will wonder why stuff doesn't
work, etc.

JDW

Jeremiah DeWitt Weiner

2004-01-23, 5:11 pm

noone <noone@noone.org> wrote:
quote:

> ... because the log files are owned by john and not joe, and the
> group-ownership is read-only, the application won't start. The log files
> are actually created by Apache Log4J.


quote:

> So question is, is there a way to force files that are ___created__ in a
> specific directory to have g+w ??



In general, no, but one thing you can do is ensure that the files
are created first and given group-write permission before you start up the
app that uses them. Then - assuming your app does not do stuff like remove
and recreate its log files - you'll be OK. Any log-rotation program will
have to take this into account, of course.

Using sudo to run the app as a single standard user isn't bad
either, although in my experience, you'll never get everybody to remember
this all the time, and some idiot will start the app as root, and then the
next guy who tries to start it correctly will wonder why stuff doesn't
work, etc.

JDW

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com