Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

402
Views
Service permission denied - Fedora 31

I am currently working on a website that will run .net code using this guide:

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-3.1

And this guide to install .net core SDK (I installed 2.1 and 3.1 while troubleshooting):

https://docs.microsoft.com/en-ca/dotnet/core/install/linux-package-manager-fedora31

I am trying to configure the apache proxy server to send requests to the Kestrel server but I am having issues with my service at /etc/systemd/system/kestrel-helloapp.service.

My service's code is:

[Unit]
Description=Started service

[Service]
WorkingDirectory=/var/www/html/PublishedVersion
ExecStart=/usr/share/dotnet /var/www/html/PublishedVersion/Website.dll
KillSignal=SIGINT
SyslogIdentifier=dotnet-example
User=root
Enviroment=ASPNETCORE_ENVIROMENT=Production

[Install]
WantedBy=multi-user.target

The service status is:

Mar 15 19:37:38 localhost.localdomain systemd[1]: Started service
Mar 15 19:37:38 localhost.localdomain systemd[1706]: kestrel-helloapp.service: Failed to execute command: Permission denied
Mar 15 19:37:38 localhost.localdomain systemd[1706]: kestrel-helloapp.service: Failed at step EXEC spawning /usr/share/dotnet: Permission denied
Mar 15 19:37:38 localhost.localdomain systemd[1]: kestrel-helloapp.service: Main process exited, code=exited, status=203/EXEC
Mar 15 19:37:38 localhost.localdomain systemd[1]: kestrel-helloapp.service: Failed with result 'exit-code'.

There are three main differences in my service code in comparison to the guides code:

1st: I have removed to auto restart, so it dosen't bog down my machine.

2nd: I have changed the ExecStart=/usr/local/dotnet to ExectStart=/usr/shared/dotnet, I have done this because my .net installation isn't at that location for some reason that eludes me.

3rd: I have changed the User=apache to User=root in an attempt to troubleshoot, the only user on my machine is root as this machine is just for school purposes.

I have also changed the SELinux settings on my machine to permissive and finally disabled in an attempt at troubleshooting.

I'm still new to this and none of this was seen in class, so go easy on me.

Thanks you for your time/answers.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Systemd has restrictions on where executed files are located. I'm not an expert in this field but there is a workaround on this issue. You can edit /etc/selinux/config and change line:

SELINUX=enforcing with SELINUX=permissive,

then restart the system and the service from systemd will start.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!