Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
Configuring Apache without changing User and Group
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Instructions for installing EPrints on [[Installing_EPrints_on_RHEL/Fedora/CentOS|Red Hat based]] or [[Installing_EPrints_on_Debian/Ubuntu|Debian based]] Linux operating systems advises that you reconfigure Apache's configuration to set the Apache <tt>User</tt> and <tt>Group</tt> to <tt>eprints</tt> rather than <tt>apache</tt> (for Red Hat based Linux) or <tt>www-data</tt> (for Debian based Linux, where these settings are defined as <tt>APACHE_RUN_USER</tt> and <tt>APACHE_RUN_GROUP</tt>). It is not absolutely necessary to set <tt>eprints</tt> as the Apache <tt>User</tt> and <tt>Group</tt> but if you choose not to do this, the alternative configuration is somewhat more complex and may still lead to certain EPrints functionality not working as expected. Particularly functionality provided by Bazaar plugins or as a result of bespoke configuration. If you choose to not configure <tt>eprints</tt> as the Apache <tt>User</tt> and <tt>Group</tt> you need to perform the following steps instead. '''If you want to make these changes to an existing EPrints repository, it is strongly recommended that you do this on a pre-production or test system first.''' This will allow you to test and fix any snags before changing your production system. 1. As the root user, add the <tt>eprints</tt> user to the <tt>apache</tt> or <tt>www-data</tt> group, (depending on the Linux OS you are running). usermod -a -G apache eprints usermod -a -G www-data eprints 2. As the root user, add the <tt>apache</tt> or <tt>www-data</tt> user, (depending on the Linux OS you are running), to the <tt>eprints</tt> group. usermod -a -G eprints apache usermod -a -G eprints www-data 3. Ensure that all the files and directories have the same permissions for the group as for the user. If you are just starting your EPrints installation this can be achieved by running one of the following commands as the root user. (The former command is already in the main installation instructions. Use the latter command if you do not want users other to be able to read EPrints code, configuration or uploaded files). chmod 2775 /opt/eprints3 chmod 2770 /opt/eprints3 If you already have an EPrints repository, changing permissions is slightly more difficult. In theory, it should suffice to just run (as the root user) the following command to add group write permissions to all files and directories. (This may take some time if you have a lot of items in your archive). chmod -R g+w /opt/eprints3 However, depending on how your permissions are currently set, this may not be sufficient and therefore is not recommended to follow the instructions on this page unless you have a good understanding of Linux filesystem permissions and how to use Apache's error logs to debug any issues that may result of following these instructions. 4. If you previously configured to use <tt>eprints</tt> as the Apache <tt>User</tt> and <tt>Group</tt>, change these back to their original values (e.g. <tt>apache</tt> in <tt>/etc/httpd/conf/httpd.conf</tt> for Red Hat based Linux and <tt>www-data</tt> in <tt>/etc/apache2/envvars</tt> for Debian based Linux). 5. As the root user, check your Apache configuration is still valid and then restart Apache. (Use <tt>apache2ctl</tt> rather than <tt>apachectl</tt> for Debian based Linux). apachectl configtest apachectl restart 6. Particularly if you are changing an pre-existing EPrints repository, thoroughly test all your repository's functionality. In particular, any functionality that interacts with other applications or services. E.g. * Logging into your repository, particularly if you don't generally use local authentication (e.g. you use LDAP, Shibboleth, etc.) * Creating new eprint records. * Uploading and downloading documents. * Check that abstract pages update after changing eprint records. * Check browse view menus update after running <tt>epadmin refresh_views</tt> * Searching for items. Particularly those newly added since following these instructions. * Adding/editing phrases in the phrase editor. * Starting and stopping the EPrints Indexer. * Sending a test email. * Any Bazaar plugins or bespoke functionality you have added to your EPrints repository. If everything is working as expected, then you are done. If you encounter any problems, try using Apache's error logs to debug and update the files with incorrect permissions. If some functionality is still broken, then you may want to revert. It should be sufficient to just change the Apache <tt>User</tt> and <tt>Group</tt> back to <tt>eprints</tt> and restart Apache.
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)