Server not able to write files?
- Edge100x
- Founder
- Posts: 12947
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Thu Apr 18, 2002 11:04 pm
- Location: Seattle
- Contact:
Re: Server not able to write files?
What is the current line?
Re: Server not able to write files?
Error message:
L 05/05/2012 - 08:44:33: Start of error session.
L 05/05/2012 - 08:44:33: Info (map "dod_chemille") (file "addons/amxmodx/logs/error_20120505.log")
L 05/05/2012 - 08:44:33: Couldn't create temp file
L 05/05/2012 - 08:44:33: [AMXX] Displaying debug trace (plugin "dodx_tk_manager.amxx")
L 05/05/2012 - 08:44:33: [AMXX] Run time error 10: native error (native "write_file")
L 05/05/2012 - 08:44:33: [AMXX] [0] 1549.attach::client_disconnect (line 163)
I cannot find in the sma where the debug temp file is to be written.
L 05/05/2012 - 08:44:33: Start of error session.
L 05/05/2012 - 08:44:33: Info (map "dod_chemille") (file "addons/amxmodx/logs/error_20120505.log")
L 05/05/2012 - 08:44:33: Couldn't create temp file
L 05/05/2012 - 08:44:33: [AMXX] Displaying debug trace (plugin "dodx_tk_manager.amxx")
L 05/05/2012 - 08:44:33: [AMXX] Run time error 10: native error (native "write_file")
L 05/05/2012 - 08:44:33: [AMXX] [0] 1549.attach::client_disconnect (line 163)
I cannot find in the sma where the debug temp file is to be written.
Re: Server not able to write files?
It appears that this is a more fundamental bug, in AMXx itself --when a plugin attempts to write a line to an existing file, AMXx uses the tmpfile() function (in file.cpp), which requires write access to c:\ (which servers can't have, for obvious security reasons). The better way to create a temporary file would be to use GetTempFileName() and related functions, as it allows specifying a prefix.
Re: Server not able to write files?
Y060N wrote:Ok another problem again with writing files. These files have all permission set by myself, even though by default they were given full access.
L 01/17/2012 - 09:39:12: Couldn't create temp file
L 01/17/2012 - 09:39:12: [AMXX] Run time error 10 (plugin "amx_settings_api.amxx") (native "write_file") - debug not enabled!
L 01/17/2012 - 09:39:12: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 01/17/2012 - 09:39:12: Unhandled dynamic native error
L 01/17/2012 - 09:39:12: [AMXX] Run time error 10 (plugin "zp50_gamemode_winos.amxx") (native "amx_save_setting_string_arr") - debug not enabled!
L 01/17/2012 - 09:39:12: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 01/17/2012 - 09:39:12: Couldn't create temp file
L 01/17/2012 - 09:39:12: [AMXX] Run time error 10 (plugin "amx_settings_api.amxx") (native "write_file") - debug not enabled!
Getting massive errors like this over and over and sometimes data is saves, other times there is no data saved.
I'd really like to know what the problem is and sort this out, as my server runs an XP plugin. This is pretty much the reason people like to stay in my server and come back.
Many thanks in advanced!
fix plugins
Re: Server not able to write files?
cpgaming, that's the same bug in AMXModX that I explained above. This is something that the developers of AMXModX fundamentally should fix, in the manner I described, but the developer of a plugin could also work around it by saving files in a different way.
Re: Server not able to write files?
Could you please explain how to do this? I am not a programmer.Edge100x wrote:It appears that this is a more fundamental bug, in AMXx itself --when a plugin attempts to write a line to an existing file, AMXx uses the tmpfile() function (in file.cpp), which requires write access to c:\ (which servers can't have, for obvious security reasons). The better way to create a temporary file would be to use GetTempFileName() and related functions, as it allows specifying a prefix.
Can I edit the sma file to point the write function to within the server folder, then recompile it?
We have a managed VDS and do not have access to a lot of things.
Thanks
Re: Server not able to write files?
That function is in AMXx itself, so fixing it would require recompiling AMXx. You could also potentially work around the use of that function by the plugin, such as by having it read in the file, change it, and save it back out. But, if you're not a programmer, fixing this may be difficult.
Re: Server not able to write files?
If you google "Displaying debug trace (plugin "dodx_tk_manager.amxx)" the only conversation that comes up is this one.
Might it be an NFO issue...?
Might it be an NFO issue...?
Re: Server not able to write files?
It is specific to how we handle system security, as mentioned by Edge100x up above. Any other host following the same basic security practices will also have the same problem.
TimeX