2017-08-11 9 views
1

root以外のユーザーとdockerイメージ(マイクロソフト/ aspnetcoreから継承)内でveeryの単純なhello world aspnetcoreアプリケーションを実行しようとしていますが、aspnetcodeがLinuxでroot以外のユーザーで実行されています

crit: Microsoft.AspNetCore.Server.Kestrel[0] Unable to start Kestrel. System.AggregateException: One or more errors occurred. (Error -13 EACCES permission denied) ---> Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -13 EACCES permission denied at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.ThrowError(Int32 statusCode) at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle handle, SockAddr& addr, Int32 flags) at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvTcpHandle.Bind(ServerAddress address) at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListenerPrimary.CreateListenSocket() at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.b__8_0(Object state) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.ListenerPrimary.d__12.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelEngine.CreateServer(ServerAddress address) at Microsoft.AspNetCore.Server.Kestrel.KestrelServer.Start[TContext](IHttpApplication`1 application) ---> (Inner Exception #0) Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -13 EACCES permission denied at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.ThrowError(Int32 statusCode) at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle handle, SockAddr& addr, Int32 flags) at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvTcpHandle.Bind(ServerAddress address) at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListenerPrimary.CreateListenSocket() at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.b__8_0(Object state) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.ListenerPrimary.d__12.MoveNext()<---

aspnetcoreは、root権限なしで実行することができなかったようだし、非常に制限されたセキュリティポリシーのrootユーザーといくつかのシナリオでドッキングウィンドウの画像のメインプロセスを実行することを可能にされていません。

root以外のユーザーがLinuxでaspnetcoreアプリケーションを実行する方法はありますか?

同じセキュリティポリシーがあるため、Sudoオプションは有効ではありません。

答えて

0

おかげで、最後の問題は、私は私のアプリを結合するためのポート80を使用しようとしていたということでした。上位のポート、つまり5000を使用している場合は、アクセス権に問題はありません。

+0

これがLinuxの動作です。 1024未満のすべてのポートでは、 – Tseng

+0

にバインドするにはルートが必要です。サイドページでは、ほとんどのWebサーバーがデフォルトポートとして使用するポートであるため、ポート80でASP.NETコアを実行しないでください。あなたは、インターネットに直接ASP.NETコアアプリケーションを公開しようとするかもしれないことを示唆しています。 **これをしない** Kestrelは(今のところ)インターネットに直面しているサーバとして動作することは想定されておらず、常に逆プロキシ(Apache、nginx、iis)の背後で実行されますが、例外としてIFSに対して承認されたWebListener 、それは窓だけです – Tseng

関連する問題