# HOME directory not found

**URL:** <https://discourse.openondemand.org/t/home-directory-not-found/3632>\
**Category:** Get Help\
**Created:** [July 18, 2024, 3:30am UTC](https://discourse.openondemand.org/t/home-directory-not-found/3632 "2024-07-18T03:30:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![hsmallbone](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hsmallbone/32/2350_2.png) [@hsmallbone](https://discourse.openondemand.org/u/hsmallbone)\
**Post date:** [July 18, 2024, 3:30am UTC](https://discourse.openondemand.org/t/home-directory-not-found/3632/1 "2024-07-18T03:30:03Z")

</div>

Hey, I have set up a new instance of OOD for the first time and when I log in I get this home directory not found error. I can see previous discussions from a while ago but none of the solutions there helped. Of note regarding my setup: there is only one node and OOD is running on the same node. The home directory has been changed from /home to a separate directory in /project/home. If I patch the ruby code as suggested in an old topic to always accept the home directory then it tries to create folders in /scratch and /project which already exist.

---

<div class="post-metadata">

**Author:** ![hsmallbone](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hsmallbone/32/2350_2.png) [@hsmallbone](https://discourse.openondemand.org/u/hsmallbone)\
**Post date:** [July 18, 2024, 5:11am UTC](https://discourse.openondemand.org/t/home-directory-not-found/3632/2 "2024-07-18T05:11:36Z")

</div>

I can use the ssh app if I navigate there directly and it says permission denied for .ssh/known\_hosts under the correct home directory which is odd.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [July 18, 2024, 1:39pm UTC](https://discourse.openondemand.org/t/home-directory-not-found/3632/3 "2024-07-18T13:39:19Z")

</div>

Yea changing home directories can be problematic. I mean if we can’t rely on LDAP as the source of truth, then it sort of all falls apart.

Is there a reason why you can’t change this value in LDAP? Or mabye you can create a symlink from `/home` to `/project/home`.

---

<div class="post-metadata">

**Author:** ![hsmallbone](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hsmallbone/32/2350_2.png) [@hsmallbone](https://discourse.openondemand.org/u/hsmallbone)\
**Post date:** [July 19, 2024, 2:30am UTC](https://discourse.openondemand.org/t/home-directory-not-found/3632/4 "2024-07-19T02:30:53Z")

</div>

We aren’t using LDAP. I can make a symlink, but is there a reason that OOD doesn’t just use the environment variables?

---

<div class="post-metadata">

**Author:** ![hsmallbone](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hsmallbone/32/2350_2.png) [@hsmallbone](https://discourse.openondemand.org/u/hsmallbone)\
**Post date:** [July 19, 2024, 2:40am UTC](https://discourse.openondemand.org/t/home-directory-not-found/3632/5 "2024-07-19T02:40:30Z")

</div>

Symlinking the home directory didn’t work - still showing the same error.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [July 19, 2024, 1:36pm UTC](https://discourse.openondemand.org/t/home-directory-not-found/3632/6 "2024-07-19T13:36:34Z")

</div>

> [@hsmallbone](#):
>
> We aren’t using LDAP.

So these are local users?

> [@hsmallbone](#):
>
> The home directory has been changed from /home to a separate directory in /project/home.

I’m not sure how you mean `changed`. If you’re not using LDAP, then the users must be local. If they’re local, then you must have changed the HOMEs in `/etc/passwd`.

We can’t rely on just the `HOME` variable because of the Ruby libraries that we and other parts of the system use. Specifically the `Etc` library - [module Etc - Documentation for Ruby 3.4](https://docs.ruby-lang.org/en/master/Etc.html)

This library is going to find the users home not from the enviornment variable, but from a Linux system call [getpwnam(3) - Linux manual page](https://man7.org/linux/man-pages/man3/getpwuid.3.html) or similar which ultimately hits the `/etc/passwd` file for local users or LDAP for LDAP users.

Did you just change the HOME environment variables without changing `/etc/passwd` data?

---

<div class="post-metadata">

**Author:** ![hsmallbone](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hsmallbone/32/2350_2.png) [@hsmallbone](https://discourse.openondemand.org/u/hsmallbone)\
**Post date:** [July 22, 2024, 1:52am UTC](https://discourse.openondemand.org/t/home-directory-not-found/3632/7 "2024-07-22T01:52:43Z")

</div>

These are local users yes, for which the HOMEs were changed in /etc/passwd

---

<div class="post-metadata">

**Author:** ![hsmallbone](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hsmallbone/32/2350_2.png) [@hsmallbone](https://discourse.openondemand.org/u/hsmallbone)\
**Post date:** [July 23, 2024, 2:56am UTC](https://discourse.openondemand.org/t/home-directory-not-found/3632/8 "2024-07-23T02:56:11Z")

</div>

I tried toggling SELinux and it seems to have progressed further, perhaps it was an SELinux issue? However now when accessing the dashboard I get error 403 which in the logs is ‘[ActionDispatch::HostAuthorization::DefaultResponseApp] Blocked host: \<login / compute host IP\>’. Seems like it’s not wanting to go through to its own IP. SSH app seems to work fine now. I have tried setting ALLOWED\_HOSTS in /etc/ood/profile to no avail.

Manually editing the dashboard config to add the host IP worked and I can access the dashboard.

---

<div class="post-metadata">

**Author:** ![hsmallbone](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hsmallbone/32/2350_2.png) [@hsmallbone](https://discourse.openondemand.org/u/hsmallbone)\
**Post date:** [July 23, 2024, 7:07am UTC](https://discourse.openondemand.org/t/home-directory-not-found/3632/9 "2024-07-23T07:07:23Z")

</div>

Setting the servername manually to my host IP worked (it was previously set to servername: null).  
[Allow ips by johrstrom · Pull Request #2998 · OSC/ondemand · GitHub](https://github.com/OSC/ondemand/pull/2998) seems related

---

<div class="post-metadata">

**Author:** ![hsmallbone](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hsmallbone/32/2350_2.png) [@hsmallbone](https://discourse.openondemand.org/u/hsmallbone)\
**Post date:** [July 23, 2024, 7:46am UTC](https://discourse.openondemand.org/t/home-directory-not-found/3632/10 "2024-07-23T07:46:42Z")

</div>

I am now getting file permission errors when accessing trivial things such as ssh-keygen, cloning directories etc. and an InvalidAuthenticityToken when accessing job templates. The dashboard is able to create files however. Am I missing something with the IP / user configuration?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [January 19, 2025, 7:47am UTC](https://discourse.openondemand.org/t/home-directory-not-found/3632/11 "2025-01-19T07:47:37Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
