Greetings! I have a tiny question. I want to run the installation as a tomcat user, instead of dspace, as described in this conversation. Howerver, when I try to run on Ubuntu 20.4:
sudo su - tomcat I get: "This account is currently not available." Do I need to be a superuser to run mvn and ant? And if not, can I switch to just "tomcat" user like this? su tomcat Because when I try, I am prompted for password, which I don't have, probably because I didn't create a "tomcat" account manually, so I end up with: su: Authentication failure How can I run install as a tomcat user? On Thursday, May 5, 2022 at 12:41:58 a.m. UTC-3 [email protected] wrote: > Ashim, those permissions look pretty restrictive. Does the build and > install actually work for you? > > I know the install docs mention the "dspace" user, but it also states > "you must ensure the Tomcat owner also owns [dspace], OR you can create a > new 'dspace' user account, and ensure that Tomcat also runs as that > account". We went with the former (because that was easier and more > standard than changing the account Tomcat runs as), and made sure the " > tomcat" user and group owned all the files. > > This is mostly from memory, but for the [dspace] directory I did > something like: > > sudo mkdir [dspace] > sudo chown tomcat:tomcat [dspace] > sudo chmod 2775 [dspace] > > And for the [dspace-source] directory I did something like: > > # Set the permissions > sudo chown -R tomcat:tomcat [dspace-source] > sudo chmod -R ug+rw [dspace-source] > # Build DSpace > sudo su - tomcat > cd [dspace-source] > $ Install > mvn package > cd dspace/target/dspace-installer > ant fresh_install > > I won't say that that's the only way, or even the correct way, but that > worked for us. > > - Darryl > > On Wednesday, May 4, 2022 at 4:02:46 PM UTC-6 [email protected] wrote: > >> Hello, >> >> Does setting these permissions allow you tu run ant ? >> >> Kind regards, >> >> On Wednesday, April 28, 2021 at 3:51:32 PM UTC+1 [email protected] >> wrote: >> >>> Dear Dspace Experts, >>> >>> I wish to know the correct permissions for the directories [dspace] >>> and [dspace-source] prior to running Maven and Ant. >>> >>> I am using the definitions of [dspace] and [dspace-source] as on this >>> page: >>> >>> https://wiki.lyrasis.org/display/DSDOC6x/Installing+DSpace >>> >>> Here is what I have been doing till now: >>> >>> For Running Maven (as user dspace): >>> I first make sure that the dspace user owns the [dspace-source] >>> directory. >>> >>> sudo chmod 700 -R [dspace-source] >>> ( Basically rwx for [dspace-source]) >>> mvn package >>> >>> For Running Ant as user dspace: >>> >>> sudo chmod 500 -R [dspace-source] >>> ( Basically READ and EXECUTE permission for [dspace-source]) >>> sudo chmod 200 -R [dspace] >>> ( Amounts to WRITE permission for [dspace]) >>> sudo chmod u+x -R [dspace] >>> This is so that the installed files can be executed >>> sudo chmod g+s -R [dspace] >>> This is so that the newly created files in [dspace] should inherit the >>> group ( which is the same as the dspace user). so that permissions are >>> inherited. >>> sudo chmod 700 -R [dspace-source] >>> >>> Then I do, as user dspace:- >>> cd [dspace-source]/dspace/target/dspace-installer >>> ant fresh_install >>> >>> Can someone here comment on my attempt ? Please share the best practice. >>> >>> Thank you, >>> Ashim >>> >> -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/8485b515-7e89-4d5f-96c1-246ddf7c05a7n%40googlegroups.com.
