permission denied in in private key in xrdp
- User
permission denied in in private key in xrdp
- Assistant
permission denied in in private key in xrdp
When you encounter a "permission denied" error related to the private key in xrdp, it usually means that the xrdp service cannot access the private key file due to incorrect file permissions or ownership. xrdp uses SSL certificates for encryption, and the private key file must be readable by the user running xrdp (typically xrdp or root).
Check your xrdp configuration files to see which private key it uses. Usually, the files are located in:
/etc/xrdp//etc/xrdp/cert.pem (contains both cert and key, sometimes separate files)/etc/xrdp/xrdp.ini or /etc/xrdp/xrdp.ini under [globals] or [security].You might see settings like:
ssl_cert=/etc/xrdp/cert.pem
ssl_key=/etc/xrdp/key.pem
or
certificate=/etc/ssl/private/ssl-cert-snakeoil.key
For example, if your private key is at:
/etc/xrdp/key.pem
Ensure that:
xrdp (often root).You can check this by running:
ls -l /etc/xrdp/key.pem
Expected permissions:
-rw------- (600) owned by root:root is fine IF xrdp runs as root.If the key file is too restrictive (e.g., 400), try:
sudo chmod 600 /etc/xrdp/key.pem
Make sure ownership is correct (adjust if needed, example):
sudo chown root:root /etc/xrdp/key.pem
ps aux | grep xrdp
or
systemctl status xrdp
If it runs as root, the above ownership and permission are fine.
If it runs as another user (like xrdp), then add that user to group owning the key, or change group of the key, e.g.:
sudo chgrp xrdp /etc/xrdp/key.pem
sudo chmod 640 /etc/xrdp/key.pem
After changing permissions or ownership, restart xrdp:
sudo systemctl restart xrdp
Check /var/log/xrdp.log and /var/log/xrdp-sesman.log to confirm if the permission denied issue persists.
sudo chown root:root /etc/xrdp/key.pem
sudo chmod 600 /etc/xrdp/key.pem
sudo systemctl restart xrdp
If xrdp runs as another user, and that user is xrdp:
sudo chown root:xrdp /etc/xrdp/key.pem
sudo chmod 640 /etc/xrdp/key.pem
sudo systemctl restart xrdp
If after these steps, the error still appears, please provide:
This will help in giving more targeted advice.
Not yet included in a published release.