Discussion:
[Dspace-tech] Owner of Assetstore directories and files
Schuster, David
2015-08-24 15:59:54 UTC
Permalink
We have been using Dspace 4.2 for a while and recently I have discovered a file permissions problem and need clarification. What user on a Debian system should own the assetstore and associated files and folders?

We had been batch loading files from the command line in 4.2 and I think the permissions were not being set appropriately. When I look at the assetstore I am seeing files owned by Dspace in the postgres group, and then also files owned by tomcat7 in the tomcat7 group.

The files that were loaded in the batch mode were loaded as root so I need to change their file permissions. When we try to load things from the UI we get file permission errors because they don't have access to those folders that were created with the batch tool in 4.2.

I wanted to chuser and group but need to know what to change them to.

I think they should all be dspace/dspace - but just want to verify...

David Schuster
Texas Woman's University
Director of Library Information Technology & Technical Support
Phone: 940-898-3909
***@twu.edu<mailto:***@twu.edu>
[emailsignature][Alma_Certified_Admin_Logo]
helix84
2015-08-24 17:14:30 UTC
Permalink
Hi David,

save yourself future headaches and only use the tomcat7 user to own
everything dspace-related on your machine - the dspace installation
directory. For consistency, you can also create the database in Postgres as
the tomcat7 user (i.e. db.username in DSpace would also be tomcat7).

This applies to both Debian and Ubuntu if you're using the tomcat7 (or any
other tomcat version) distribution package.

If you notice the generic advice in the DSpace installation docs to run
everything as the "dspace" user, my advice is just an application of the
principle to Debian, where the tomcat package determines the user name
(tomcat7). You shouldn't change the ownership of tomcat's files because
they belong to the package and the package will reinstall them under the
tomcat7 name upon the nearest package upgrade.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Luiz dos Santos
2015-08-24 17:57:07 UTC
Permalink
Hi helix,

It is just a question, why not using the tomcat installed by himself,
instead to user everything as tomcat7 user?
In his case he could just run the comand: "chown -R dspace:tomcat7 *" In
Assetstore directory and certificate that himself that when he run the
batch process that all files have the same permissions?

Thanks
Luiz
Post by helix84
Hi David,
save yourself future headaches and only use the tomcat7 user to own
everything dspace-related on your machine - the dspace installation
directory. For consistency, you can also create the database in Postgres as
the tomcat7 user (i.e. db.username in DSpace would also be tomcat7).
This applies to both Debian and Ubuntu if you're using the tomcat7 (or any
other tomcat version) distribution package.
If you notice the generic advice in the DSpace installation docs to run
everything as the "dspace" user, my advice is just an application of the
principle to Debian, where the tomcat package determines the user name
(tomcat7). You shouldn't change the ownership of tomcat's files because
they belong to the package and the package will reinstall them under the
tomcat7 name upon the nearest package upgrade.
Regards,
~~helix84
Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
------------------------------------------------------------------------------
_______________________________________________
DSpace-tech mailing list
https://lists.sourceforge.net/lists/listinfo/dspace-tech
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
helix84
2015-08-25 07:55:31 UTC
Permalink
Post by Luiz dos Santos
It is just a question, why not using the tomcat installed by himself,
instead to user everything as tomcat7 user?
In his case he could just run the comand: "chown -R dspace:tomcat7 *" In
Assetstore directory and certificate that himself that when he run the
batch process that all files have the same permissions?
Sure, if you're installing from binaries downloaded from tomcat.apache.org,
you can call your tomcat/dspace user whatever you want. But using binaries
kind of defeats the purpose of using a distribution - you'll most likely
never do security updates to tomcat.

And like I said, if you chown the binaries of Tomcat from the Debian
package, it will chown it back during the nearest update and most likely
leave you with non-functional DSpace (you most likely won't immediately
notice it because only uploads won't work). I speak from my own experience
:)


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Loading...