FS#33443 - [tomcat7] How to run it as ordinary user

Attached to Project: Arch Linux
Opened by Musikolo (Musikolo) - Friday, 18 January 2013, 22:17 GMT
Last edited by Guillaume ALAUX (galaux) - Thursday, 21 February 2013, 19:46 GMT
Task Type Support Request
Category Packages: Extra
Status Closed
Assigned To Guillaume ALAUX (galaux)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I would like to know what to do run Tomcat 7 as ordinary user. Although now I'm able to do so, it's a bit weird all I have done sticks to the normal procedure. Next you have all I have done it to make my ordinary non-root users to be able to start Tomcat 7 (by means of startup.sh script):
* Add it to the tomcat group
* Change the user of some files within /usr/share/tomcat7 from root to tomcat
* Grant the tomcat group write permission for all files and directories below /usr/share/tomcat7

Apart from that, I had tomcat (version 5) installed by the time I installed tomcat7. Then I decided to remove tomcat (version 5) package which removed the tomcat user and group. I had to reinstall tomcat7 to restore them back.

Is this the expected procedure?

I think I have read and follow the instructions indicated in the wiki at https://wiki.archlinux.org/index.php/Tomcat

Please, advice.

Best regards,
Musikolo
This task depends upon

Closed by  Guillaume ALAUX (galaux)
Thursday, 21 February 2013, 19:46 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 7.0.37-1
Comment by Guillaume ALAUX (galaux) - Tuesday, 22 January 2013, 09:11 GMT
Tomcat in Arch Linux is packaged to be run as root only. This ensures only the administrator of the machine can run it and also allows the use of jsvc [0] and low port numbers. So running Tomcat as non root is *not supported* by Arch Linux.

If you are trying to use Tomcat for development purpose (like using it in an IDE), I would suggest downloading and untarring your own Tomcat tarball from Apache's website. This is how it is usually done for professionnal development environments. This doesn't go against how Tomcat is packaged: *official* Arch Linux Tomcat package is for a *production* server (thus needs root and jsvc) whereas development Tomcat could just come from a downloaded tarball and could be run locally by unprivileged user.

> Then I decided to remove tomcat (version 5) package which removed the tomcat user and group.
tomcat6 and tomcat7 share the same user and group (tomcat:tomcat) which creates this unfortunate collision. Each should use its own user and group. I will add this.

[0] https://www.archlinux.org/packages/extra/i686/java-jsvc/
Comment by Musikolo (Musikolo) - Wednesday, 23 January 2013, 22:02 GMT
Thanks for response.

I will do as you suggest, i.e., to use a tarred version of Tomcat.

Best regards,
Musikolo

Loading...