title: Fixing a systemd service 203/EXEC failure (no such file or directory)
body: <p>I'm trying to set up a simple systemd timer to run a bash script every day at midnight.</p>
  
  <p><code>systemctl --user status backup.service</code> fails and logs the following:</p>
  
  <pre><code>backup.service: Failed at step EXEC spawning /home/user/.scripts/backup.sh: No such file or directory.
  
  backup.service: Main process exited, code=exited, status=203/EXEC
  Failed to start backup.
  backup.service: Unit entered failed state.
  backup.service: Failed with result 'exit-code'.
  </code></pre>
  
  <p>I'm lost, since the files and directories exist. The script is executable and, just to check, I've even set permissions to 777.</p>
  
  <p>Some background:</p>
  
  <p>The <code>backup.timer</code> and <code>backup.service</code> unit files are located in <code>/home/user/.config/systemd/user</code>.</p>
  
  <p><code>backup.timer</code> is loaded and active, and currently waiting for midnight.</p>
  
  <p>Here's what it looks like:</p>
  
  <pre><code>[Unit]
  Description=Runs backup at 0000
  
  [Timer]
  OnCalendar=daily
  Unit=backup.service
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>Here's <code>backup.service</code>:</p>
  
  <pre><code>[Unit]
  Description=backup
  
  [Service]
  Type=oneshot
  ExecStart=/home/user/.scripts/backup.sh
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>And lastly, this is a paraphrase of <code>backup.sh</code>:</p>
  
  <pre><code>#!/usr/env/bin bash
  
  rsync -a --delete --quiet /home/user/directory/ /mnt/drive/directory-backup/
  </code></pre>
  
  <p>The script runs fine if I execute it myself.</p>
  
  <p>Not sure if it matters, but I use <code>fish</code> as my shell (started from .bashrc).</p>
  
  <p>I'm happy to post the full script if that's helpful.</p>