cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if Alfresco is really running as root?

kylee
Champ in-the-making
Champ in-the-making
Hi,

I am running Alfresco Community 4.2.f on Ubuntu 14.04.  I installed Alfresco using the downloaded bin file alfresco-community-4.2.f-installer-linux-x64.bin.

I wanted to run a content transformation from tif to txt, and have created the ocrtiff-transform-context.xml in
/opt/alfresco-4.2.f/tomcat/shared/classes/alfresco/extension.  The xml file makes a reference to the script file named /opt/alfresco-4.2.f/ocr.  There is a command /usr/bin/tesseract input_file.tif output_file -l eng in the script file.  Tesseract converts the input tif file into an output txt file.  The script file was made executable, owned by root.root.

I used the configuration as stated in https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/integration-other-....

The input file was stored in the /tmp directory and owned by root.root.  The output text file generated by tesseract has ZERO bytes, which I am really baffled.  I am able to run the tesseract command using the command line, but using sudo.

Is this a permission problem?  Is it not that alfresco is running as root?

How do I check please?


KY
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator

I can't think of a good reason to run Alfresco as root. I can think of a lot of good reasons not to.

To check, just do ps -ef|grep alfresco and look to see who owns the process. Here's an example:

ubuntu@some-host:~$ ps -ef|grep tomcat
ubuntu     943   922  0 18:24 pts/0    00:00:00 grep --color=auto tomcat
alfresco 25682     1 28 Sep02 ?        5-14:28:30 /opt/alfresco/java/bin/java -Djava.util.logging.config.file=/opt/alfresco/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms512M -Xmx3992M -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Djava.awt.headless=true -Dalfresco.home=/opt/alfresco -XX:ReservedCodeCacheSize=128m -Xmx2G -Djavax.net.ssl.keyStore=/data/alf_data/keystore/someKeystore.jks -Djavax.net.ssl.keyStorePassword=ue27Uc5ZiFwV -Djava.endorsed.dirs=/opt/alfresco/tomcat/endorsed -classpath /opt/alfresco/tomcat/bin/bootstrap.jar:/opt/alfresco/tomcat/bin/tomca-juli.jar -Dcatalina.base=/opt/alfresco/tomcat -Dcatalina.home=/opt/alfresco/tomcat -Djava.io.tmpdir=/opt/alfresco/tomcat/temp org.apache.catalina.startup.Bootstrap start

That "alfresco" next to 25682 says this process is running as the alfresco user, not root, which is what you want.