Applied Bimatics - An Informatics & eHealth Blog

I am a clinician with a passion for informatics. This blog is about my eHealth journey exploring interoperability in Electronic Medical Records (EMR/EHR), Patient Safety, Pharmacovigilance, Data Analytics, Clinical Research and Bioinformatics in a clinical context. Comparing Canadian, Indian and Middle Eastern healthcare systems and services. Join our open facebook group here: https://www.facebook.com/groups/clinical.bioinformaticians/


Running Tomcat as www-data

For last couple of days I have been working on a web based application for skin color measurement as I blogged here. The core of the application is implemented in php as it is much easier to handle. (May be I am more comfortable with it). But the GD image library for php has limited functionality. So I had to rely on Java for border detection and segmentation. So I implemented part of the functionality as a servlet running on tomcat6.

Today's latte, Apache Tomcat.
Today's latte, Apache Tomcat. (Photo credit: yukop)
Both php and servlet had to read and write same files. But standard configuration does not allow this as php creates files as www-data (apache user) and tomcat creates files as tomcat6 user. I searched the internet for solutions. One suggestion was to create an appropriate umask for both which I could never completely understand. Finally I realised that the easiest solution is to make tomcat run as user www-data so that all created files will have same ownership.

I found this webpage with detailed instructions on how to do this. I would like to add two more steps:
1. Edit /etc/init.d/tomcat6 also to add the user ID and group ID
2. chown var/cache/tomcat6 directory also.
Nina Jablonski - The Evolution of Human Skin Color
Nina Jablonski - The Evolution of Human Skin Color (Photo credit: wagnerfreeinstitute)

BTW the application is hosted on my laptop. If you want to check it out click on the banner below if you see it. You will see it only when my laptop is on.


Labels: , , , , , , , , ,



Post a Comment

All comments, questions and criticisms welcome. Relevant comments with hyperlinks will be accepted. Though this form is not CommentLuv enabled, interesting and useful comments will be acknowledged with DoFollow links in the body of the post. Irrelevant comments and spam will be deleted.

Links to this post:

Create a Link

<< Home

About Me

As a Dermatologist and Informatician my research mainly involves application of bioinformatics techniques and tools in dermatological conditions. However my research interests are varied and I have publications in areas ranging from artificial intelligence, sequence analysis, systems biology, ontology development, microarray analysis, immunology, computational biology and clinical dermatology. I am also interested in eHealth, Health Informatics and Health Policy.

Address

Bell Raj Eapen
Hamilton, ON
Canada