Is it normal for both the dspace and tomcat users to have crontab files?

41 views
Skip to first unread message

Kerry Bouchard

unread,
May 12, 2021, 10:07:48 AM5/12/21
to DSpace Technical Support
After adding a parameter to the filter-media command in our dspace user crontab file and not seeing any difference, I realized that the tomcat user on our system also has a crontab file with identical entries. As far as I can tell, it's the tomcat crontab that is actually being used. Is there a reason for the dspace user to have a crontab file when tomcat does?

Thanks, Kerry

Alan Orth

unread,
May 12, 2021, 1:35:20 PM5/12/21
to Kerry Bouchard, DSpace Technical Support
Dear Kerry,

That sounds strange and could cause some unexpected issues. Technically you should put the cron jobs in the cron tab of the user who owns the DSpace installation directory (ie, where the code is deployed, not the source folder). In my case this is the `dspace` user, which is probably also the user you are running Tomcat as. The reason is that the cron jobs read and write files, indexes, logs, etc to the DSpace installation directory so if the jobs are running as a user without permissions there they will fail.

Hope that helps!

On Wed, May 12, 2021 at 5:07 PM Kerry Bouchard <k.bou...@tcu.edu> wrote:
After adding a parameter to the filter-media command in our dspace user crontab file and not seeing any difference, I realized that the tomcat user on our system also has a crontab file with identical entries. As far as I can tell, it's the tomcat crontab that is actually being used. Is there a reason for the dspace user to have a crontab file when tomcat does?

Thanks, Kerry

--
All messages to this mailing list should adhere to the Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/a86dac9a-84d1-46aa-b932-2c6db2958bd8n%40googlegroups.com.


--

Mark H. Wood

unread,
May 13, 2021, 8:57:15 AM5/13/21
to dspac...@googlegroups.com
I can't think of any. But my question is: is there a reason to have
separate users 'dspace' and 'tomcat'? Unless you're doing something
fancy, I would just have an account for Tomcat and let DSpace's
files be owned by it.

The installation guide seems quite firm that there is a user named
'dspace', but that's not at all necessary. What *is* necessary is
that Tomcat have read access to DSpace's configuration and web
applications, and write access to the logs, assetstore, upload
directory, etc. So normally I just install Tomcat via the OS' package
manager and let the whole DSpace installation directory tree be owned
by whatever account the package manager created for Tomcat.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc

Kerry Bouchard

unread,
May 13, 2021, 9:57:55 AM5/13/21
to DSpace Technical Support

Alan and Mark,
Thanks to you both. Our /opt/projects/dspace directories are owned by the tomcat user. I wasn't involved in the initial implementation of DSpace on our server, so I don't know why the dspace user exists. Right now the dspace user owns the /opt/projects/freelib-djatoka directory tree, which as I understand it is the jpeg2 converter code that produces display copies of TIF files that go into dark storage. Those directories have read+execute access set for all users, so I can't think of any reason that filter-media would need to run under the dspace account to create jpeg2 files. For now, I've deleted the crontab entries for the dspace account. When version 7 is out of beta, I'll see if we still need the dspace account at all when we upgrade.

              Thanks, Kerry
Reply all
Reply to author
Forward
0 new messages