Hi, 

I'm glad you got the permissions sorted but your initial post suggested you
were hoping to have multiple JVMs writing to the same file.

This would most likely be a bad thing and would probably leave you with
mangled logs.  

Regards

Andy

> -----Original Message-----
> From: William Noto [mailto:[EMAIL PROTECTED]
> Sent: 18 March 2005 19:13
> To: 'Log4J Users List'; 'James Stauffer'
> Subject: RE: logging to one file from two separate users / same group
> 
> Ah ha -
> 
> Somewhere some script was telling tomcat to use umask 022.  We got around
> this by inserting umask 002 in our Catalina.sh script found in
> ~tomcat/bin/.
> 
> Hope this may help someone else in the future.
> 
> -----Original Message-----
> From: James Stauffer [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 18, 2005 11:33 AM
> To: Log4J Users List
> Subject: Re: logging to one file from two separate users / same group
> 
> The code doesn't explicitly specify permissions (It would be hard to
> do that in a cross-platform manner) so my only advice is to research
> into getting Linux to set the correct permissions.
> 
> On Fri, 18 Mar 2005 11:05:48 -0500, William Noto <[EMAIL PROTECTED]>
> wrote:
> > Thanks for the very quick reply, James.  I believe that I currently
> allow
> > group write in the directory.  When I execute "umask -S", I see:
> > "u=rwx,g=rwx,o=rx" and when I execute straight "umask", I get: "0002"
> >
> > [EMAIL PROTECTED] logs]$ umask -S
> > u=rwx,g=rwx,o=rx
> > [EMAIL PROTECTED] logs]$ umask
> > 0002
> > [EMAIL PROTECTED] logs]$ ls -la
> > total 140
> > drwsrwsr-x   2 tstream apps  4096 Mar 18 10:07 .
> > drwxrwxr-x  11 tstream apps  4096 Mar 17 19:08 ..
> > -rw-r--r--   1 tomcat  apps  5584 Mar 18 10:07 logfile.log
> > -rw-rw-rw-   1 tomcat  apps 79236 Mar 17 20:26 logfile.log.2005-03-17
> > [EMAIL PROTECTED] logs]$
> >
> > You can see that yesterday's logfile (logfile.log.2005-03-17) has
> read/write
> > permission across the board, but that is only because I manually chmoded
> > that file yesterday during testing.
> >
> > -----Original Message-----
> > From: James Stauffer [mailto:[EMAIL PROTECTED]
> > Sent: Friday, March 18, 2005 10:48 AM
> > To: Log4J Users List
> > Subject: Re: logging to one file from two separate users / same group
> >
> > Can you set the umask so that the group has write permissions?
> >
> > On Fri, 18 Mar 2005 10:34:34 -0500, William Noto <[EMAIL PROTECTED]>
> > wrote:
> > > Hi all -
> > >
> > > I've looked around on the web and through some message boards trying
> to
> > find
> > > if someone has already asked this question. I've read through the FAQ
> and
> > I
> > > don't think that I've seen this asked before.  Please excuse me if
> this
> > > question HAS been asked before.
> > >
> > > I'm creating a code base that will be shared between a web application
> > > (running under tomcat) and a few standalone classes.  I would like
> > > everyone's logging to share the same log files however.  I am
> developing
> > on
> > > a PC but my staging and production environments are both running
> Linux.
> > >
> > > Also - I've set up my logs to rollover so that each new day will have
> its
> > > own log.
> > >
> > > My issue pertains to the write permissions of the log files.  When the
> web
> > > application logs first, the log file is created by the tomcat user
> (and
> in
> > > the tomcat group) in my logs directory and it has only read
> permissions
> at
> > > the group level and other level.  Only the tomcat user has read/write
> > access
> > > to the log file.  When the application that runs outside of tomcat
> > executes
> > > first (under a different username, btw), the logfile is created such
> that
> > it
> > > is owned by that user and again it has the same permissions.
> > >
> > > So I am wondering - Is it possible to configure log4j so that it will
> > create
> > > log files with group write permission by default?
> > >
> > > I have set my logging directory's sticky bit to have all new files be
> > > created with the correct group.  The tomcat user and the non-tomcat
> user
> > are
> > > both in the same group.
> > >
> > > Is logging via sockets the only way to resolve this kind of issue?
> That
> > > seems like overkill.
> > >
> > > Thanks much and again - I'm sorry if I am repeating a question asked
> > before.
> > >
> > > William
> > >
> > > William B. Noto    Open Finance    71 Gansevoort Street, Suite 2D, New
> > York,
> > > NY 10014
> > > Tel  + 1 646 230 8666     Fax  + 1 646 230 8657
> > >
> > >
> >
> > --
> > James Stauffer
> > Are you good? Take the test at http://www.livingwaters.com/good/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to