Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.43k stars 382 forks source link

Access to the path '/terraria/config/' is denied. ---> System.IO.IOException: Permission denied #1714

Closed WaterKnight1998 closed 4 years ago

WaterKnight1998 commented 4 years ago

Any stack traces or error messages (if known)?


TerrariaAPI Version: 2.1.0.0 (Protocol v1.3.5.3 (194), OTAPI 1.3.5.3)
[TShock] Info Config path has been set to /terraria/config/
[TShock] Info Log path has been set to /terraria/logs
[Server API] Error Startup aborted due to an exception in the Server API initialization:
System.InvalidOperationException: Plugin "TShock" has thrown an exception during initialization. ---> System.Excepti                                                                                                                                                                on: Fatal TShock initialization exception. See inner exception for details. ---> System.UnauthorizedAccessException:                                                                                                                                                                 Access to the path '/terraria/config/' is denied. ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
  at System.IO.FileSystem.CreateDirectory (System.String fullPath) [0x00191] in <a1ae6166591d4020b810288d19af38d4>:0                                                                                                                                                                
  at System.IO.Directory.CreateDirectory (System.String path) [0x0002c] in <a1ae6166591d4020b810288d19af38d4>:0
  at TShockAPI.TShock.Initialize () [0x00081] in <ee5ce75026b74995a03fdbd3cc824395>:0
   --- End of inner exception stack trace ---
  at TShockAPI.TShock.Initialize () [0x00195] in <ee5ce75026b74995a03fdbd3cc824395>:0
  at TerrariaApi.Server.PluginContainer.Initialize () [0x00006] in <1498ccee3bc746fbbb4c96e1caa989d3>:0
  at TerrariaApi.Server.ServerApi.LoadPlugins () [0x002eb] in <1498ccee3bc746fbbb4c96e1caa989d3>:0
   --- End of inner exception stack trace ---
  at TerrariaApi.Server.ServerApi.LoadPlugins () [0x00313] in <1498ccee3bc746fbbb4c96e1caa989d3>:0
  at TerrariaApi.Server.ServerApi.Initialize (System.String[] commandLineArgs, Terraria.Main game) [0x00110] in <149                                                                                                                                                                8ccee3bc746fbbb4c96e1caa989d3>:0
  at TerrariaApi.Server.HookManager.InitialiseAPI () [0x0004e] in <1498ccee3bc746fbbb4c96e1caa989d3>:0
Terraria Server v1.3.5.3

Unhandled exception
System.UnhandledExceptionEventArgs
[Server API] Error ===================================================================================
[Server API] Error An unhandled exception has occured in TSAPI, and a crash report will be generated
[Server API] Error Generating a crash report, please wait...
[Server API] Error Crash report saved at crash_132325004768264630.zip
[Server API] Error Please upload the crash file and report it at http://tshock.co/
[Server API] Error The process will terminate.
[Server API] Error ===================================================================================
[ERROR] FATAL UNHANDLED EXCEPTION: System.UnauthorizedAccessException: Access to the path '/terraria/world' is denie                                                                                                                                                                d. ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
  at System.IO.FileSystem.CreateDirectory (System.String fullPath) [0x00191] in <a1ae6166591d4020b810288d19af38d4>:0                                                                                                                                                                
  at System.IO.Directory.CreateDirectory (System.String path) [0x0002c] in <a1ae6166591d4020b810288d19af38d4>:0
  at Terraria.IO.WorldFile.loadWorldDirect (System.Boolean loadFromCloud) [0x00080] in <788df755de55431ab5a8cb189729                                                                                                                                                                ff2f>:0
  at Terraria.IO.WorldFile.loadWorld (System.Boolean loadFromCloud) [0x0000c] in <788df755de55431ab5a8cb189729ff2f>:                                                                                                                                                                0
  at Terraria.WorldGen.serverLoadWorldCallBack (System.Object threadContext) [0x00022] in <788df755de55431ab5a8cb189                                                                                                                                                                729ff2f>:0
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in <a1ae6166591                                                                                                                                                                d4020b810288d19af38d4>:0
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threa                                                                                                                                                                ding.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <a1ae6166591d4020b8                                                                                                                                                                10288d19af38d4>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.Con                                                                                                                                                                textCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <a1ae6166591d4020b810288d19                                                                                                                                                                af38d4>:0
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in                                                                                                                                                                 <a1ae6166591d4020b810288d19af38d4>:0
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <a1ae6166591d4020b810288d19af38d4>:0
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <a1ae6166591d4020b810288d19af38d4>                                                                                                                                                                :0
QuiCM commented 4 years ago

Have you set up read/write permissions correctly on the directory/user/executable?

Looks like /terraria/world is the culprit in the second half there

WaterKnight1998 commented 4 years ago

Have you set up read/write permissions correctly on the directory/user/executable?

Looks like /terraria/world is the culprit in the second half there

It was an error with the docker volumes.

Is it possible to run tshock with .net core on linux or do we need dmono?

bartico6 commented 4 years ago

As far as I know, you cannot without some significant changes to a bunch of things.

WaterKnight1998 commented 4 years ago

As far as I know, you cannot without some significant changes to a bunch of things.

What things?