Skip to content

deluge: deployment activation is failing when setting up the systemd-tmpfiles #262295

@seberm

Description

@seberm

Describe the bug

My deluge deployment is failing when setting up the systemd-tmpfiles for /mnt/downloads/deluge (move_completed_path) and /mnt/downloads/deluge/.incomplete (download_location).

The /mnt/downloads directory is mounted using NFS.

$ mount | grep downloads
hostname:/mnt/disk/downloads on /mnt/downloads type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=60,retrans=2,sec=sys,clientaddr=<addr>,local_lock=none,addr=<addr>)
$ ls -alhd /mnt/downloads/deluge
drwxrwsr-x 28 deluge deluge 4.0K Oct 20 13:53 /mnt/downloads/deluge
$ colmena apply --on @prod
...
[ERROR]   stdout) setting up /etc...
[ERROR]   stderr) reloading user units for root...
[ERROR]   stderr) setting up tmpfiles
[ERROR]   stderr) fchmod() of /mnt/downloads/deluge failed: Operation not permitted
[ERROR]   stderr) fchmod() of /mnt/downloads/deluge/.incomplete failed: Operation not permitted
[ERROR]  failure) Child process exited with error code: 3

Steps To Reproduce

By running systemd-tmpfiles --create on a target host.

$ systemd-tmpfiles --create
fchmod() of /mnt/downloads/deluge failed: Operation not permitted
fchmod() of /mnt/downloads/deluge/.incomplete failed: Operation not permitted

Expected behavior

The operation should not fail or I should be at least able to influence the behavior - I want to keep the permissions unchanged.

If this should not be possible, could you please help me find some kind of workaround (e.g. overlay?) to not add these directories under the systemd.tmpfiles.rules?

Additional context

Problematic lines in the deluge module:

Notify maintainers

@domenkozar @ebzzry

Metadata

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.58, NixOS, 23.05 (Stoat)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.6`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions