tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aria Bamdad <>
Subject Re: Changing tomcat's group
Date Fri, 28 Apr 2006 18:06:44 GMT


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.

On Thu, 27 Apr 06 16:55:40 -0400 Aria Bamdad said:
>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:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message