-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
home directory not writable by default #63
Comments
Not sure I understand the issue correctly. The permissions for the home directory should be set in a way that allows the nexus user to write to that directory: Why isn't the |
I found that I had to override the home directory variable in hiera to something nested like /opt/nexus for it to properly work. The issue I found was that setting the root path for nexus to /srv (or in my case /opt) set the service users' home dir to that. It was created as root instead of the user so when the service ran it did not have permissions to write to the directory. |
maybe then setting the default in the module to /srv/nexus or even /opt/nexus would be a better choice? |
The default is currently We set the root here: Are you using the latest version? Am I missing something? |
The module extracts the nexus package to $nexus_root, creating a directory with the nexus version number in it. That directory is represented by $nexus_home_real
$nexus_home is created at the end as a symlink to the currently running version under $nexus_home_real. It's confusing but was the best idea I could come up with at the time. Not sure of a better way to handle that version number. |
The issue is not necessarily with the location /srv/nexus (although /opt/nexus would be a more standard install location), it is the user that gets created to run the service. If you look at /etc/passwd you will see that it is set to /srv (using all defaults from params.pp). So when the service is started there is something inside the application that is trying to write to the users' home directory (assuming java property 'user.home'). My working around was to set the nexus_root to /opt/nexus and the service would start without any intervention. |
It's just a minor fix to the user resource in init.pp. Sent from my iPhone
|
Hi,
Using this module and the defaults for the home directory (ie. /srv), the ownership of this directory chowned to the nexus user, and so nexus isn't able to create the /srv/.java folder in order to store preferences. Leading to errors similar to:
https://issues.sonatype.org/browse/NEXUS-3671
The text was updated successfully, but these errors were encountered: