# Sbatch: error: s\_p\_parse\_file: unable to read "/etc/slurm/slurm.conf": Permission denied

**URL:** <https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394>\
**Category:** Get Help\
**Created:** [July 28, 2025, 2:37pm UTC](https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394 "2025-07-28T14:37:21Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![s.park](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/s.park/32/2845_2.png) [@s.park](https://discourse.openondemand.org/u/s.park)\
**Post date:** [July 28, 2025, 2:37pm UTC](https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394/1 "2025-07-28T14:37:21Z")

</div>

Hello,

I got error when I submit an interactive desktop.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/0/02187309df4dd419156036d093fa18675bbd62a7.jpeg)

my slurm.conf is readable for everyone.

```bash
# ls -l /etc/slurm/slurm.conf
-rw-r--r--. 1 root root 7922 Jul 28 14:06 /etc/slurm/slurm.conf

```

Indise of slurm.conf, `ClusterName` is set.

`ondemand-web`, `slurm controller` and `cluster host` are different but the communication between them are okay.

`/etc/ood/config/clusters.d/my_cluster.yml` is below.

```bash
---
v2:
  metadata:
    title: "My Cluster"
  login:
    host: "hpc-lg01.my_cluster.com"
  job:
    adapter: "slurm"
    bin: "/usr/bin"
    conf: "/etc/slurm/slurm.conf"
  batch_connect:
    basic:
      script_wrapper: |
        module purge
        %s
      set_host: "host=$(hostname -A | awk '{print $1}')"
    vnc:
      script_wrapper: |
        module purge
        export PATH="/opt/TurboVNC/bin:$PATH"
        export WEBSOCKIFY_CMD="/usr/bin/websockify"
        %s
      set_host: "host=$(hostname -A | awk '{print $1}')"

```

and `/etc/ood/config/apps/bc_desktop/my_cluster.yml`

```bash
---
title: "Cluster Desktop"
cluster: "my_cluster"
attributes:
  desktop: "xfce"

```

I might miss something but I couldn’t find it.

I already test interactive desktop with dev-cluster and it worked well. But, with my\_cluster, it does not work.  
Thank you in advance for any help.

PARK

---

<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 28, 2025, 2:41pm UTC](https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394/2 "2025-07-28T14:41:03Z")

</div>

> [@s.park](#):
>
> my slurm.conf is readable for everyone.

I see this as 644 - but I wonder about the directory above it. Can you `ls -l` as a regular unprivileged user? Unable to read/permission denied is pretty straight forward.

Remember to `ls -l` on the OnDemand machine itself, this is where the command is being issued, so this is where you have to test to validate it.

---

<div class="post-metadata">

**Author:** ![s.park](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/s.park/32/2845_2.png) [@s.park](https://discourse.openondemand.org/u/s.park)\
**Post date:** [July 28, 2025, 2:44pm UTC](https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394/3 "2025-07-28T14:44:47Z")

</div>

Thank you for your answer.  
Here it is for the permission.

```bash
s.park@ondemand-web01 ~ $ ls -l /etc/slurm/
total 16
-rw-r--r--. 1 root root 7922 Jul 28 14:06 slurm.conf

```

PARK

---

<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 28, 2025, 2:57pm UTC](https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394/4 "2025-07-28T14:57:36Z")

</div>

Maybe it’s an SELinux thing?

Can you just issue `sbatch` with and without CONF environment variable set to that /etc file and see if it works from a command line?

---

<div class="post-metadata">

**Author:** ![s.park](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/s.park/32/2845_2.png) [@s.park](https://discourse.openondemand.org/u/s.park)\
**Post date:** [July 28, 2025, 3:13pm UTC](https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394/5 "2025-07-28T15:13:16Z")

</div>

With `slurm.conf`,

This is script file for sbatch

```bash
#!/bin/bash
echo "Hello world!"

```

I submitted this job with sbatch.

```bash
s.park@ondemand-web01 ~ $ sbatch tx.sh
Submitted batch job 948700

```

and output is..

```bash
s.park@ondemand-web01 ~ $ cat slurm-948700.out
Hello world!

```

Without `slurm.conf`  
I got failed.

```bash
s.park@ondemand-web01 ~ $ sbatch tx.sh
sbatch: error: resolve_ctls_from_dns_srv: res_nsearch error: Unknown host
sbatch: error: fetch_config: DNS SRV lookup failed
sbatch: error: _establish_config_source: failed to fetch config
sbatch: fatal: Could not establish a configuration source

```

Also, as expected, without `slurm.conf`, tired to submit desktop on the web and failed with this error.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/1/1d3083fe19ac823c24dd521489bae528faad403d.jpeg)

PARK

---

<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 28, 2025, 3:25pm UTC](https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394/6 "2025-07-28T15:25:44Z")

</div>

Not without the file itself, with and without the `CONF=/etc/slurm/slurm.conf` **environment variable** set.

---

<div class="post-metadata">

**Author:** ![s.park](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/s.park/32/2845_2.png) [@s.park](https://discourse.openondemand.org/u/s.park)\
**Post date:** [July 28, 2025, 4:34pm UTC](https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394/7 "2025-07-28T16:34:52Z")

</div>

I’ve comment the conf line in cluster .yml file as below.

```bash
 job:
    adapter: "slurm"
    bin: "/usr/bin"
      # conf: "/etc/slurm/slurm.conf"

```

However, with or without conf environment variable, same error is occured.

PARK

---

<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 28, 2025, 4:37pm UTC](https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394/8 "2025-07-28T16:37:40Z")

</div>

It’s likely an SELinux issue. Do you have SELinux enabled?

---

<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 28, 2025, 4:38pm UTC](https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394/9 "2025-07-28T16:38:01Z")

</div>

And if so, check out /var/log/audit.log and see if there are errors there.

---

<div class="post-metadata">

**Author:** ![s.park](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/s.park/32/2845_2.png) [@s.park](https://discourse.openondemand.org/u/s.park)\
**Post date:** [July 28, 2025, 4:50pm UTC](https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394/10 "2025-07-28T16:50:14Z")

</div>

Yes, SELinux was enforced.  
I disabled it and then it works well.  
Thank you for your guide.

PARK

---

<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 28, 2025, 4:52pm UTC](https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394/11 "2025-07-28T16:52:58Z")

</div>

Pull requests to this component are welcome! It’s always slightly different on different systems, so any patches we get on it from the community are greatly appreciated!

---

<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 24, 2026, 4:53pm UTC](https://discourse.openondemand.org/t/sbatch-error-s-p-parse-file-unable-to-read-etc-slurm-slurm-conf-permission-denied/4394/12 "2026-01-24T16:53:02Z")

</div>

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