Server not able to write files?

Y060N
New to forums
New to forums
Posts: 10
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Tue Jan 17, 2012 9:40 am

Server not able to write files?

Post by Y060N »

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!
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Server not able to write files?

Post by Edge100x »

We don't restrict your ability to write custom files to your server folder. If you can write the file through FTP, your server will be able to write it while it is running.

Is this plugin trying to write a file outside of the server folder?
Y060N
New to forums
New to forums
Posts: 10
Joined: Tue Jan 17, 2012 9:40 am

Re: Server not able to write files?

Post by Y060N »

Absolutely none. It's just the files inside:

/cstrike/addons/amxmodx/data/vault (2 files here, and 2 temp journals)

/cstrike/addons/amxmodx/plugins/rank_top (10 files here, 1 for each player in the "top 10")
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Server not able to write files?

Post by Edge100x »

Can you confirm that you're able to edit them through the FTP?

Do you have another plugin that might be interfering?
Y060N
New to forums
New to forums
Posts: 10
Joined: Tue Jan 17, 2012 9:40 am

Re: Server not able to write files?

Post by Y060N »

Only 1 plugin accesses those rank files. One other plugin references the bank vault file but it is a separate file all together.

As for being able to edit them - if I try to edit them while the server is running it says they are in use by another process when I try to save it. I was, however, able to edit them through the file manager.
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Server not able to write files?

Post by Edge100x »

It is very likely one of two things, then: Either another plugin or AMXx itself is locking the files, or your plugin has a bug. As your next troubleshooting step, I would recommend disabling the plugin and seeing if you can edit the files through FTP while the server is running. This would tell you whether it's another plugin or AMXx.
Y060N
New to forums
New to forums
Posts: 10
Joined: Tue Jan 17, 2012 9:40 am

Re: Server not able to write files?

Post by Y060N »

When I ran the files on my local server, everything was being able to be written in fine by the plugin and all of the other current plugins that run on the server.
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Server not able to write files?

Post by Edge100x »

Was your local server running the same OS? Was it the same version of the game and all the plugins exactly the same? Were the same clients connecting to it?
Y060N
New to forums
New to forums
Posts: 10
Joined: Tue Jan 17, 2012 9:40 am

Re: Server not able to write files?

Post by Y060N »

Nope :P I will try to disable it and see if I can
paperb0y
New to forums
New to forums
Posts: 5
Joined: Fri Aug 26, 2011 5:09 am

Re: Server not able to write files?

Post by paperb0y »

The problem is the plugin not the server.
User avatar
TimeX
Staff
Staff
Posts: 1730
Joined: Thu Jul 22, 2004 12:24 am
Location: Big Bear, CA

Re: Server not able to write files?

Post by TimeX »

This was resolved recently and turned out to be the plugin attempting to write a temp file to a directory that we have protected on our Windows based systems. It seems that some other hosts don't use the same security practices that we do, and as such, did not have the same problem. A switch to Linux resolved the issue in this case.
TimeX
Y060N
New to forums
New to forums
Posts: 10
Joined: Tue Jan 17, 2012 9:40 am

Re: Server not able to write files?

Post by Y060N »

Yep it was many plugins actually trying to write temp files. Changing the TEMPDIR only helps with linux based systems but it was resolved by giving access to a temp folder with Linux OS.
Pvt_Kirby
New to forums
New to forums
Posts: 5
Joined: Sat May 05, 2012 5:55 am

Re: Server not able to write files?

Post by Pvt_Kirby »

I have the same issue, need to write to a folder but cannot change permissions through ftp.
I wish to stay with Windows...
Now what?
I have a managed VDS - if I go to an unmanaged will I be able to change permissions?
Thanks
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Server not able to write files?

Post by Edge100x »

The best way to go would be to change the plugin to write to a valid folder. Failing this, yes, switching to unmanaged would allow you to have lower security than we do and give your game server full access to the system. I really would not recommend lax security as part of a long-term solution, however.
Pvt_Kirby
New to forums
New to forums
Posts: 5
Joined: Sat May 05, 2012 5:55 am

Re: Server not able to write files?

Post by Pvt_Kirby »

Thank you for the prompt reply.
I can change the sma and recompile it - but I wouldn't know where to point it to write the file.
Thx
Post Reply