USGS-WiM / STNServices

.net Core refactored STNServices2
Other
0 stars 0 forks source link

Setting up .netcore on Linux; unable to run exectutable due to apparent permissions issue. #9

Closed lprivette closed 5 years ago

lprivette commented 5 years ago

I'm following these guide doc to setup .netcore on our new Linux server: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-2.1&tabs=aspnetcore2x

The guide is using CentOS 7 instead of Ubuntu 16.04, but .netcore is compatible with that distro of linux. So I've been following the guide using Ubuntu 16.04 instead of CentOS 7. The only differences I've encountered so far were command syntax.

I completed all the steps down to where it says "Start the service and verify that it's running:". Here I run into an apparent permissions error (see image below, commands made are highlighted yellow): image

It is failing at the dotnet executable. So I checked the permissions for that file: image

First of all, there's the x in each group, which would imply that I should be able to run it, right? Second, I tried running this command to open it up to everyone, just to see if that fixed it:
image

It says that it's updated the file to 777 but if you look at the file again, it still -rwxr-xr-x which is wrong if it's been changed to 777 right? It should be rwxrwxrwx.

Ever encountered a permissions issue like that? Where it should be updated but it's not?

And/or is there a way for me to somehow run sudo for the ExecStart section within that service file (image of file contents below): image

Any ideas? @jknewson @aaronstephenson

aaronstephenson commented 5 years ago

Hi @lprivette I just now have time available to help. Let's chat IRL when you're in the office.

aaronstephenson commented 5 years ago

@lprivette It looks like it's working to me... image image

It seems you just didn't restart this kestrel service after changing the permissions on the dotnet file.

I would recommend scaling back the permissions now to determine the exact minimum settings that will work; you don't want to leave the 'other' permissions wide open. Perhaps start by returning the permissions back to their initial settings (755).

lprivette commented 5 years ago

Can't seem to connect at all today. Is it possible that the internal IP changed?

HansVraga commented 5 years ago

Going to close, if further issues occur, will open a new one.