On Tue, Jul 02, 2013 at 09:14:33AM -0400, Thomas Ronayne wrote:
> > Is there some reason you want the account to be named "dspace"?
> > DSpace doesn't care, and never logs in.  DSpace only needs to have its
> > files accessible by Tomcat, and the simplest way to do that is to have
> > them owned by the same account that runs Tomcat.
> Only because I'm working my way through the installation instructions 
> and got to the point that adds an account for dspace (which, of course, 
> indicates that it needs to be the same UID as Tomcat. You know, the 
> installation runs from pp. 39-67 and I'm taking one step at a time on a 
> clean install of Slackware 14.0 (with patches applied). Hit the 
> instruction that says "create the dspace user," so I create the dspace 
> user (this is a few pages after installing Tomcat and making sure that 
> it works; i.e., I can start it in a browser and get the "It Works" 
> message). Just a little confusing when you see "create the dspace user" 
> and then start thinking about two users with the same UID and stuff like 
> that.

Indeed.  There's sort of an assumption in the manual that you're
installing Tomcat from source and have no OS conventions to guide you,
and the only reason you have Tomcat at all is to run DSpace, so it's
suggested to name the account "dspace".  You are not the only one to
be confused by this.

The overriding issue is that DSpace files must be read/write
accessible by Tomcat.  I think the manual does not say this forcefully
enough.  If your distro. installs an account "tomcat" to run it, then
that is what I would use to own the DSpace files.

> > DSpace is just one of the things Tomcat is doing in its own address
> > space.  So Tomcat needs a user identity but DSpace doesn't.  If you
> > let the DSpace files be owned by the account that the Tomcat
> > installation created, it works.  If you change the account name, you
> > will probably have to reconfigure the Tomcat startup script, and make
> > sure it doesn't get unreconfigured when Tomcat is upgraded some day.
> Following the instructions at this point I have, in /etc/passwd, two 
> accounts:
> 
>     tomcat:x:232:232::/var/lib/tomcat:/bin/bash
>     dspace:x:1001:1001::/home/dspace:/bin/bash
> 
> So, I gotta wonder why there's a dspace account; tomcat can own all the 
> dspace files, that's no problem, but why the heck is there a separate 
> account (that wants to be the same UID) -- that's where the confusion 
> lies. Unix-like systems really don't like multiple users with the same 
> UID. I can simply chown all the dspace files to 232 (in this case) and 
> be done with it but there's that nagging question.

Yes, there is no need for a second account.  I think I'm going to make
another attempt at rewriting that part of the installation guide.

> > DSpace is told in its configuration where it lives and doesn't depend
> > on the OS for such knowledge.  OTOH I don't know whether Tomcat makes
> > use of its "home" directory and would be reluctant to change it.
> I think the rule for tomcat is that you leave it alone 'cause the 
> browser can find it by the port.
> 
> I've looked further at the configuration file and I'm probably going to 
> put the dspace files in /opt and symlink where necessary (I usually 
> install "optional" software, things like OpenOffice, in /opt so it'll 
> live in /opt/dspace unless there's a real good reason to stick it in the 
> /usr tree -- which I try to avoid).

That's what I've done with DSpace.  I usually leave /usr for the
distro's package management system.  I install unpackaged stuff into
/usr/local if it wants to spread out among bin, man, lib, etc. or into
/opt if it wants to all be in one subtree.

Tomcat is sometimes finicky about symlinks.  It depends on how it's
configured.  You may need to copy the webapp.s over.  This would have
to be done each time you rebuild DSpace.

> > You're correct that DSpace should not be installed inside Tomcat.  Put
> > it in some other convenient place.  Only the webapp.s that you intend
> > to use need to be known to Tomcat, and are typically copied from
> > [DSpace] to wherever Tomcat's webapps/ directory is.
> I'm pretty sure that tomcat points at /var/lib/tomcat (with links to 
> /etc) but I wouldn't bet the farm on that -- I've never used tomcat and 
> still have a learning curve to contend with.

Clearly ~tomcat is /var/lib/tomcat, according to your /etc/passwd.
You might want to look through the startup script for CATALINA_HOME
and (perhaps) CATALINA_BASE to see where Tomcat's files are placed.
It may be split between /var/lib/tomcat and e.g. /usr/share/tomcat --
it is on Gentoo Linux.

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Machines should not be friendly.  Machines should be obedient.

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to