ryansheehan / terraria

Dockerfile for terraria
MIT License
299 stars 104 forks source link

System.UnauthorizedAccessException: Access to the path "/world/rules.txt" is denied #36

Closed L3-X closed 4 years ago

L3-X commented 4 years ago

Attempting to start the server but keep encountering the System.UnauthorizedAccessException exception. Only began having this problem after the server crashed.

Have checked the permissions and they remain the same as when the server was working. Not sure what happened. Can't even generate a new world without encountering this issue. Have tried pulling a new image but no luck.

Log below

[05/20/20 15:32:52] [Server API] Verbose: TerrariaApi - Server v2.1.0.0 started.
[05/20/20 15:32:52] [Server API] Verbose:       Command line: /tshock/TerrariaServer.exe -configPath /world -worldpath /world -logpath /tshock/logs -world /world/world.wld
[05/20/20 15:32:52] [Server API] Verbose:       OS: Unix 4.19.0.0 (64bit: True)
[05/20/20 15:32:52] [Server API] Verbose:       Mono: True
[05/20/20 15:32:52] [TShock] Info: Config path has been set to /world
[05/20/20 15:32:52] [TShock] Info: World path has been set to /world
[05/20/20 15:32:52] [TShock] Info: Log path has been set to /tshock/logs
[05/20/20 15:32:52] [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.Exception: Fatal TShock initialization exception. See inner exception for details. ---> System.UnauthorizedAccessException: Access to the path "/world/rules.txt" is denied.
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <c453bf849bb84e719dbec0475e99db95>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000] in <c453bf849bb84e719dbec0475e99db95>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions)
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00055] in <c453bf849bb84e719dbec0475e99db95>:0
  at System.IO.StreamWriter..ctor (System.String path) [0x00008] in <c453bf849bb84e719dbec0475e99db95>:0
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string)
  at System.IO.File.WriteAllText (System.String path, System.String contents) [0x00026] in <c453bf849bb84e719dbec0475e99db95>:0
  at TShockAPI.FileTools.CreateIfNot (System.String file, System.String data) [0x00008] in <83a11edfadfb403aa2dbbdee90bedfdf>:0
  at TShockAPI.FileTools.SetupConfig () [0x0001c] in <83a11edfadfb403aa2dbbdee90bedfdf>:0
  at TShockAPI.TShock.Initialize () [0x000ac] in <83a11edfadfb403aa2dbbdee90bedfdf>:0
   --- End of inner exception stack trace ---
  at TShockAPI.TShock.Initialize () [0x001a1] in <83a11edfadfb403aa2dbbdee90bedfdf>:0
  at TerrariaApi.Server.PluginContainer.Initialize () [0x00006] in <638eeb99f42245989265fa06f9d3b112>:0
  at TerrariaApi.Server.ServerApi.LoadPlugins () [0x002eb] in <638eeb99f42245989265fa06f9d3b112>:0
   --- End of inner exception stack trace ---
  at TerrariaApi.Server.ServerApi.LoadPlugins () [0x00313] in <638eeb99f42245989265fa06f9d3b112>:0
  at TerrariaApi.Server.ServerApi.Initialize (System.String[] commandLineArgs, Terraria.Main game) [0x0011a] in <638eeb99f42245989265fa06f9d3b112>:0
  at TerrariaApi.Server.HookManager.InitialiseAPI () [0x0004e] in <638eeb99f42245989265fa06f9d3b112>:0

Thanks.

ryansheehan commented 4 years ago

yeah, i think i had a publish go bad, working on it now... the pre3 tag i think works. Hopefully have a fix soon

On Wed, May 20, 2020 at 10:40 AM L3 notifications@github.com wrote:

Attempting to start the server but keep encountering the System.UnauthorizedAccessException exception. Only began having this problem after the server crashed.

Have checked the permissions and they remain the same as when the server was working. Not sure what happened. Can't even generate a new world without encountering this issue. Have tried pulling a new image but no luck.

Log below

[05/20/20 15:32:52] [Server API] Verbose: TerrariaApi - Server v2.1.0.0 started. [05/20/20 15:32:52] [Server API] Verbose: Command line: /tshock/TerrariaServer.exe -configPath /world -worldpath /world -logpath /tshock/logs -world /world/world.wld [05/20/20 15:32:52] [Server API] Verbose: OS: Unix 4.19.0.0 (64bit: True) [05/20/20 15:32:52] [Server API] Verbose: Mono: True [05/20/20 15:32:52] [TShock] Info: Config path has been set to /world [05/20/20 15:32:52] [TShock] Info: World path has been set to /world [05/20/20 15:32:52] [TShock] Info: Log path has been set to /tshock/logs [05/20/20 15:32:52] [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.Exception: Fatal TShock initialization exception. See inner exception for details. ---> System.UnauthorizedAccessException: Access to the path "/world/rules.txt" is denied. at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in :0 at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000] in :0 at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions) at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00055] in :0 at System.IO.StreamWriter..ctor (System.String path) [0x00008] in :0 at (wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string) at System.IO.File.WriteAllText (System.String path, System.String contents) [0x00026] in :0 at TShockAPI.FileTools.CreateIfNot (System.String file, System.String data) [0x00008] in <83a11edfadfb403aa2dbbdee90bedfdf>:0 at TShockAPI.FileTools.SetupConfig () [0x0001c] in <83a11edfadfb403aa2dbbdee90bedfdf>:0 at TShockAPI.TShock.Initialize () [0x000ac] in <83a11edfadfb403aa2dbbdee90bedfdf>:0 --- End of inner exception stack trace --- at TShockAPI.TShock.Initialize () [0x001a1] in <83a11edfadfb403aa2dbbdee90bedfdf>:0 at TerrariaApi.Server.PluginContainer.Initialize () [0x00006] in <638eeb99f42245989265fa06f9d3b112>:0 at TerrariaApi.Server.ServerApi.LoadPlugins () [0x002eb] in <638eeb99f42245989265fa06f9d3b112>:0 --- End of inner exception stack trace --- at TerrariaApi.Server.ServerApi.LoadPlugins () [0x00313] in <638eeb99f42245989265fa06f9d3b112>:0 at TerrariaApi.Server.ServerApi.Initialize (System.String[] commandLineArgs, Terraria.Main game) [0x0011a] in <638eeb99f42245989265fa06f9d3b112>:0 at TerrariaApi.Server.HookManager.InitialiseAPI () [0x0004e] in <638eeb99f42245989265fa06f9d3b112>:0

Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ryansheehan/terraria/issues/36, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB46ER6XFPMLFASNF3YG5MLRSP2VLANCNFSM4NGBQMKQ .

ryansheehan commented 4 years ago

republished a new version, let me know if that works for you

L3-X commented 4 years ago

Just pulled and tested, works again. Appreciate the speedy response.