2

-- Files created by a Tomcat webapp and owner, owner group, permissions for this file --

Hello and thank you for reading my post.

I am running a "Tomcat v6.0" webapp on a "Debian 7.2 Wheezy" OS.

In particular, this webapp creates some files on the filesystem.

The files created have:

  • "tomcat6" as the owner user,
  • "tomcat6" as the owner group,
  • 644 as the permissions granted to the owner, the owner group and others respectively.

Is it possible to change this behavior?

What I like to do is:

  • set the owner user to "user1",
  • set the owner group to "group1",
  • set the permissions to 660 for every new file created.

Best regards.

Léa Massiot
  • 1,928
  • 6
  • 25
  • 43

1 Answers1

0

Use umask for permissions. For ownership, you'll have to change the effective uid and gid of the process to do that. If you want, you could write a cron job that changes file ownership periodically.

Christopher Schultz
  • 20,221
  • 9
  • 60
  • 77
  • Thank you for your answer. I was more looking for a solution which would have involved the creation of ACLs (Access Control Lists)... A rule/rules associated to a directory that would force the owner, owner group and permissions of new files and directories... – Léa Massiot Mar 14 '14 at 14:03