Solved!!!

The solution is to use the linux group sticky bit to force any files
created in a directory (and subdirectories) to have the same group
as the parent.  For example let's say there are two applications,
one for accounting and one for payroll.  If you create a directory
for accounting and one for payroll, each belonging to their own
group and tomcat belonging to both groups, then tomcat can read the
files in both directories but when it creates a file, it ends up
being tomcat user and tomcat group.  If you change the settings on the
two directories as follows:

chmod g+ws /accounting
chmod g+ws /payroll

then when files are created in either directory, they will have the same
group ownership as the directory.  Problem solved.

Thanks for those who commented.

Aria.
On Thu, 27 Apr 06 16:55:40 -0400 Aria Bamdad said:
>Hi,
>
>I have several applications running in different directories.  Each
>application is owned by a different linux owner/group.  In order for
>Tomcat to be able to read these files to serve them, the Tomcat has
>as it's secondary groups, the group names of each application.
>
>The problem I am having is that when any of the applications create
>a file, the file created has the owner/group tomcat:tomcat which
>prevents the application owner from accessing the file directly
>(as a logged in linux user).
>
>How do others address this problem? Is there a way to have Tomcat
>dynamically switch 'group' before serving somthing from each application?
>
>Thanks in advance.
>
>---------------------------------------------------------------------
>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