About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
A Linux server has had the Microsoft Defender for Endpoint package installed and the product does not work. Either service mdatp status does not show the service running, or typing mdatp returns command not found. Microsoft's installation troubleshooting page covers both, and it opens with a warning that matters here: "An error in installation might or might not result in a meaningful error message by the package manager." A package manager that finished without complaint therefore proves little, and the first job is to establish what actually happened.
What follows takes the page's order: read the install log, confirm the package suits the distribution, check dependencies, then work through the service itself. Nothing before the Fix section changes anything.
What the error means
Defender for Endpoint on Linux runs as a service named mdatp. On the page's sample status output the unit is mdatp.service, loaded from /lib/systemd/system/mdatp.service, and its processes are /opt/microsoft/mdatp/sbin/wdavdaemon. The command-line tool mdatp is a separate piece, and it is what an administrator types to see health and to collect diagnostics.
So there are two different symptoms with different causes. If the service is not running, the daemon did not start, or the unit file, the mdatp user or the daemon's permissions are wrong. The page gives a command that creates a link at /usr/bin/mdatp for this case; it does not say the service is healthy when the link is missing. The sections below keep them apart.
Likely causes
Microsoft's page names these, in this order:
| Cause | Where the page covers it |
|---|---|
| The installation did not finish properly | "Verify that the installation succeeded" |
| The package does not match the distribution and version | "Make sure you have the correct package" |
| A dependency is missing | "Installation failed due to dependency error" |
The mdatp user does not exist |
"Steps to troubleshoot if the mdatp service isn't running" |
The mdatp.service unit file is not found |
the same section |
| SELinux is installed and in enforcing mode | the same section |
/opt is a symbolic link |
the same section |
The daemon wdavdaemon is not executable, or its file system is mounted noexec |
the same section |
The mdatp command is not linked |
"Command-line tool mdatp isn't working" |
The page gives no counts, so the order is not an order of likelihood.
The package table on the page pairs files with distributions: mdatp-rhel8.Linux.x86_64.rpm for Oracle, RHEL and CentOS 8.x; mdatp-sles12.Linux.x86_64.rpm for SUSE Linux Enterprise Server 12.x; mdatp-sles15.Linux.x86_64.rpm for SUSE Linux Enterprise Server 15.x; mdatp.Linux.x86_64.rpm for Oracle, RHEL and CentOS 7.x; and mdatp.Linux.x86_64.deb for Debian and Ubuntu 16.04, 18.04 and 20.04. Its note adds: "MDE Linux no longer ships a solution for RHEL 6."
On dependencies the page says the mdatp RPM package needs glibc >= 2.17 and the Debian package needs libc6 >= 2.23. For versions older than 101.25032.0000 the RPM package also needs mde-netfilter and pcre, and the Debian package mde-netfilter and libpcre3. The mde-netfilter package has dependencies of its own: libnetfilter-queue1 and libglib2.0-0 on Debian, and libmnl, libnfnetlink, libnetfilter_queue and glib2 for RPM. Finally: "Beginning with version 101.25042.0003, uuid-runtime is no longer required as an external-dependency."
Prove the cause before changing anything
The first command filters the system journal for the installer's lines and writes them to a file called installation.log in the current directory. It changes nothing else on the system.
sudo journalctl --no-pager|grep 'microsoft-mdatp' > installation.log
Then read the file for the page's success marker:
grep 'postinstall end' installation.log
The page's sample result is a line from microsoft-mdatp-installer ending in postinstall end with a date and time. Microsoft's reading: "An output from the previous command with correct date and time of installation indicates success." If the line is missing, the installation did not complete and the package, not the service, is the problem.
These read-only commands come from the same page and show the service, the user and the daemon file:
service mdatp status
id "mdatp"
ls -l /opt/microsoft/mdatp/sbin/wdavdaemon
What to look for:
service mdatp status: the page's healthy sample shows "Active: active (running)" and thewdavdaemonprocesses. Anything else points into the service steps below (our reading, not a statement on the page). Record the output.id "mdatp": the page says "If there's no output", themdatpuser is missing. Record what you saw.ls -lon the daemon: the page's sample shows-rwxr-xr-x, ownerroot. If the executable bits are missing, the daemon cannot start. Record the full line, because it is what lets you reverse the permission step later.
Also compare the package you installed with the table above. The page gives no command for reading the distribution and version, so use whatever your distribution provides. For a manual deployment the page says "make sure the correct distro and version are selected" when downloading.
Example (illustrative, not a recorded case): a Debian 10 server is built for a customer, the .deb file for Debian and Ubuntu is installed, and nothing complains. grep 'postinstall end' installation.log returns nothing. The table lists Debian and Ubuntu 16.04, 18.04 and 20.04 only, so the package was not built for that release, and the right next step is to look at Microsoft's current supported-platform information before changing anything on the box.
Fix
Work through the section that matches the proof. If the installation itself failed on missing dependencies, the page says you can manually download the prerequisite dependencies named in the lists above. It gives no commands for that, so none are given here; after any such repair, repeat the install-log check.
If the install succeeded but the service is not running, take the steps below. They use the page's commands; the SELinux, /opt link and noexec causes are described after the permission step, because they are not walked through here.
Step 1: create the mdatp user if it is missing
Save first: the output of id "mdatp" from the proof section is the record. The page runs the next command only when that output is empty.
Risk: the next command creates a new system account named mdatp with no home directory and a shell of /usr/sbin/nologin. The page gives no way to undo it, so run it only if id "mdatp" printed nothing.
sudo useradd --system --no-create-home --user-group --shell /usr/sbin/nologin mdatp
Step 2: start or restart the service
Save first: keep the service mdatp status output from the proof section.
Disruptive step: the next commands start the Defender for Endpoint service and then restart it. While a security service restarts the server is briefly without that service's protection and reporting (general advice, not on Microsoft's page), so choose a quiet moment. The page gives no way to undo a restart; if the status afterwards is not "Active: active (running)", carry on with the later steps.
sudo service mdatp start
sudo service mdatp restart
Step 3: copy the unit file if the service is not found
The page says: "If mdatp.service isn't found upon running the previous command, run:" the copy below. Save first by noting that the unit file was reported as not found, because the page runs the copy only when the unit file is not found. Our reading, not the page's: a copy onto a same-named file would overwrite it.
Risk: the next command copies Microsoft's unit file into the system's systemd directory. The page gives no way to undo it. Replace <systemd_path> with /lib/systemd/system for Ubuntu and Debian, or /usr/lib/systemd/system for RHEL, CentOS, Oracle and SLES, the two values the page names.
sudo cp /opt/microsoft/mdatp/conf/mdatp.service <systemd_path>
The page then says to rerun step 2, and its warning applies again.
Step 4: make the daemon executable
Save first: the ls -l line you recorded for wdavdaemon.
Risk: the next command sets the permissions of the Defender daemon file to 0755 (in general Linux terms, readable and executable by everyone and writable by its owner). Run it only if the daemon does not have executable permissions.
sudo chmod 0755 /opt/microsoft/mdatp/sbin/wdavdaemon
To undo it, only if you need to reverse this change: this changes the permissions of the daemon file again, and it can put back a mode that cannot start the service. Run sudo chmod on the same file with the octal mode that matches the letters you recorded (for example, -rw-r--r-- is 0644). After the permission change itself, the page says to retry step 2, and its warning applies again.
What the page also says, described rather than walked through
Three more causes are on the page, and each is described here because changing them lowers protection or alters the layout of the server.
SELinux: "If the above steps don't work, check if SELinux is installed and in enforcing mode." The page suggests trying permissive mode, which it prefers, or disabled mode, by setting SELINUX in /etc/selinux/config and rebooting, then retrying step 2. It also says: "Revert the configuration change immediately though for security reasons after trying it and reboot." That is two reboots and a period with SELinux not enforcing, so plan it as a change with an agreed window, not a quick test.
A symbolic link on /opt: "If /opt directory is a symbolic link, create a bind mount for /opt/microsoft". The page gives no command for it.
A noexec mount: "Ensure that the file system containing wdavdaemon isn't mounted with noexec". The page gives no command for checking it.
Step 5: the mdatp command is not found
The page says that when running the command-line tool mdatp gives command not found, one command fixes it.
Save first: record that running mdatp printed command not found, then run the read-only ls -l /usr/bin/mdatp and record what it prints (a link or file already there, or no such file). The page gives no command for this check; ls -l is general advice.
Risk: the next command creates, or replaces if one is already there, a symbolic link at /usr/bin/mdatp pointing to wdavdaemonclient. The -f option replacing an existing file is general knowledge about ln, not stated on the page. The page gives no way to undo it, so run it only when mdatp really is not found.
sudo ln -sf /opt/microsoft/mdatp/sbin/wdavdaemonclient /usr/bin/mdatp
Step 6: collect diagnostics for Microsoft
If none of this helps, the page says to collect logs and send them to Microsoft's support.
Save first: the page names no existing file that this command replaces, so there is nothing to record.
Risk: the next command writes a zip file of Defender diagnostic logs to disk. The page gives no way to remove it and does not state its size or contents, so treat the file as sensitive until you know what it holds (general advice).
sudo mdatp diagnostic create
The output reads "Diagnostic file created:" followed by the path of the zip file. The page's instruction is "Reach out to our customer support with these logs."
Confirm the fix
Run the read-only checks again.
service mdatp status
grep 'postinstall end' installation.log
The service should show "Active: active (running)", and the installation log should still show the success line. The page also says to "Also check the Client configuration to verify the health of the product and detect the EICAR text file." The page gives no command for that check.
If the service runs but the EICAR test file is not detected, the page points at the file system. Check its type with the page's command, replacing the placeholder with the path of the test file:
findmnt -T <path_of_EICAR_file>
The page's reading: "Any files outside these file systems aren't scanned." It refers to a list of supported file systems for on-access activity, which is on a separate Microsoft page.
What to watch afterwards
- A change of Linux distribution or major release. The package table is tied to specific versions, so match the package again after an upgrade.
- Newer Defender versions that change the dependency list, as the 101.25032.0000 and 101.25042.0003 notes show.
- A server where
/optis a symbolic link or a data file system mountednoexec, which the page lists as service blockers. - SELinux policy changes after hardening, since the page names enforcing mode as a cause.
Read next
Related articles you may want next.
- Troubleshootingdnf "Error: Failed to download metadata for repo": read the reason after the colondnf says Failed to download metadata for repo? The reason after the colon points to a retired repo, empty mirror list, proxy, TLS or cache. Check each.Read article
- TroubleshootingSELinux blocks the web server: "avc: denied", httpd_can_network_connect and port labelsWeb server blocked by SELinux? Read the avc denied line with ausearch, then set the right boolean or port label with setsebool and semanage port.Read article
- TroubleshootingLinux boot stuck on "A start job is running for ...": what systemd is waiting forBoot stuck on A start job is running for a device or mount? Read the time and limit, find the unit it waits on, then fix fstab entries or network waits.Read article
Risks and limits
These steps have not been run or lab-tested. The page lists packages only for the distributions in its table, and it gives no instruction for releases beyond them, so check Microsoft's current supported-platform information before installing on another release. The instructions it gives for SELinux, the /opt link and noexec come without commands, which is why they are described and not walked through.
The page gives no way to undo creating the mdatp user, copying the unit file, creating the command link or writing the diagnostic zip. Treat each as a permanent addition to the server and make each only after the matching proof.
Sources
- Troubleshoot installation issues for Microsoft Defender for Endpoint on Linux — Microsoft Learn, page dated 2026-01-14, accessed 3 December 2026
This article was originally published on .