# Error -- Permission denied @ dir\_s\_mkdir - /var/run/ondemand-nginx

**URL:** <https://discourse.openondemand.org/t/error-permission-denied-dir-s-mkdir-var-run-ondemand-nginx/896>\
**Category:** Get Help\
**Created:** [May 5, 2020, 4:29pm UTC](https://discourse.openondemand.org/t/error-permission-denied-dir-s-mkdir-var-run-ondemand-nginx/896 "2020-05-05T16:29:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmcooper402](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/dmcooper402/32/345_2.png) [@dmcooper402](https://discourse.openondemand.org/u/dmcooper402)\
**Post date:** [May 5, 2020, 4:29pm UTC](https://discourse.openondemand.org/t/error-permission-denied-dir-s-mkdir-var-run-ondemand-nginx/896/1 "2020-05-05T16:29:38Z")

</div>

Hello,

I am having issues with a new installation of Open OnDemand. I have installed the latest 1.7 rpm (selinux package) and mounted a shared /home directory.

I am now getting this error in my browser after I log in. This takes about a minute to show up:

```
Error -- Permission denied @ dir_s_mkdir - /var/run/ondemand-nginx
Run 'nginx_stage --help' to see a full list of available command line options.

```

I am not seeing anything notable in the Apache logs or in the system logs either. I do see:

```
May 5 11:02:09 ood sudo: pam_systemd(sudo:session): Failed to create session: Connection timed out
May 5 11:02:09 ood sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
May 5 11:02:09 ood sudo: pam_unix(sudo:session): session closed for user root

```

However that is it.

I have a feeling I may have missed some configuration with the selinux booleans? However looking through the configuration topics it looks like my setup matches up with the installation defaults.

any help is much appreciated, thank you

---

<div class="post-metadata">

**Author:** ![milberg](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@milberg](https://discourse.openondemand.org/u/milberg)\
**Post date:** [May 8, 2020, 12:47am UTC](https://discourse.openondemand.org/t/error-permission-denied-dir-s-mkdir-var-run-ondemand-nginx/896/2 "2020-05-08T00:47:51Z")

</div>

To confirm, do the system logs you’ve checked include `/var/log/audit/audit.log`? Is the shared `/home` space NFS mounted? If so, `use_nfs_home_dirs` may be a relevant SELinux boolean.

---

<div class="post-metadata">

**Author:** ![danielfr](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/danielfr/32/449_2.png) [@danielfr](https://discourse.openondemand.org/u/danielfr)\
**Post date:** [May 11, 2020, 12:12pm UTC](https://discourse.openondemand.org/t/error-permission-denied-dir-s-mkdir-var-run-ondemand-nginx/896/3 "2020-05-11T12:12:50Z")

</div>

Just to mention that I had the same error and selinux was indeed the culprit

---

<div class="post-metadata">

**Author:** ![dmcooper402](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/dmcooper402/32/345_2.png) [@dmcooper402](https://discourse.openondemand.org/u/dmcooper402)\
**Post date:** [May 24, 2020, 8:51pm UTC](https://discourse.openondemand.org/t/error-permission-denied-dir-s-mkdir-var-run-ondemand-nginx/896/4 "2020-05-24T20:51:12Z")

</div>

Thanks folks. SElinux ended up being the issue.

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 3:43pm UTC](https://discourse.openondemand.org/t/error-permission-denied-dir-s-mkdir-var-run-ondemand-nginx/896/5 "2022-05-26T15:43:14Z")

</div>

Closed on May 26, 2022, 3:43pm UTC


