rustdesk / rustdesk/rustdesk-server

Run hbbr and hbbs not as root

Open
#365 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
10.4k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

I have just installed the debian packages rustdesk-server-hbbr_1.1.10-3_amd64.deb and rustdesk-server-hbbs_1.1.10-3_amd64.deb on a Debian 11 vm.

Everything works flawlessly, but I have seen that the executables are run as the root user.

I'd like to have them run as a dedicated non privileged user instead of root.

Since the program does not make use (at least by default) of lower ports, even a normal user can run it without issues.

I have modified the systemd units to make it run with a "rustdesk" user and group I have created, I have chowned the /var/log/rustdesk and /var/lib/rustdesk directories (and their contents) and indeed the server works fine without being root.

This allows for a little better security overall in case of some RCE flaw in hbbr and hbbs.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the systemd units installed with the rustdesk-server-hbbr and rustdesk-server-hbbs Debian packages, along with access to /var/log/rustdesk and /var/lib/rustdesk. The work is done when both services run as a dedicated non-root user and continue to operate correctly with their required files and directories.

Written by the indexing model from the issue text.

Assessment

Tech stack
debian, rust
Domain
infrastructure, security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.