Page 1 of 1

Headless Server: writing Permission denied [Solved]

Posted: Wed Oct 19, 2016 1:30 pm
by Brick
So i was trying to set up a headless server when i encountered a wild writing permission error:
Main problem
While i can clearly tell that it isn't capable of writing to a file i have no clue to what the only thing that it says that is possibly related to this is:
Probably related
Does anyone here know how to solve this?

Note:
The map is based off a scenario yet it does not have any script with it only some neutral and/or indestructible stuff.
Also yes i'm aware that it probably was extra information but might as well be safe then possibly sorry i suppose.
Before anyone starts about administrator mode i already tried that and made the server not even start at at all.

Edit:
Found out that it is because the start.bat is IN the factorio\bin\x64 which steam makes a read-only. Yet i still have the problem that i can't open it since it keeps linking me back tot he steam directory.

Re: Headless Server: writing Permission denied

Posted: Sun Oct 23, 2016 2:27 pm
by Brick
I hate to bump a topic but since it hasn't been solve yet i see not other option.

I might at this point just give anything that could possibly be related and hope someone knows how to fix this.
Errors
Start.bat
Location of Factorio server is IN the steamapps\common\Factorio\bin\x64 (which is on a separate hard-drive)

Please do note that i tried to set it to a normal folder yet something sets it back every time which doesn't really help me at all. If anyone has any clue on how to solve this please post it here.

Re: Headless Server: writing Permission denied

Posted: Sun Oct 23, 2016 3:34 pm
by posila
Hi, can you post full log here, please? Also if the save is not from freeplay scenario, upload the save too, so we can test it locally.

Well, first delete C:\Users\Brick\AppData\Roaming\Factorio\temp folder. Something in it might be read-only by accident, so better get rid of it.

Second, I am unclear about what you try to achieve.

Code: Select all

start /W factorio.exe. --start-server ".\saves\server.zip" --server-settings ".\data\server-settings.json"
Looks like you want to start server with save located at:
steamapps\common\Factorio\bin\x64\saves\server.zip and server setting located at steamapps\common\Factorio\bin\x64\server-settings.json
It might be best if you just specify full paths to those files (both the save and server-settings.json) ... for example --start-server "C:\Users\Brick\AppData\Roaming\Factorio\server.zip", or --start-server "C:\My Factorio Saves\server.zip" ... wherever you put it.

Re: Headless Server: writing Permission denied

Posted: Sun Oct 23, 2016 4:52 pm
by Brick
posila wrote:Hi, can you post full log here, please? Also if the save is not from freeplay scenario, upload the save too, so we can test it locally.

Well, first delete C:\Users\Brick\AppData\Roaming\Factorio\temp folder. Something in it might be read-only by accident, so better get rid of it.

Second, I am unclear about what you try to achieve.

Code: Select all

start /W factorio.exe. --start-server ".\saves\server.zip" --server-settings ".\data\server-settings.json"
Looks like you want to start server with save located at:
steamapps\common\Factorio\bin\x64\saves\server.zip and server setting located at steamapps\common\Factorio\bin\x64\server-settings.json
It might be best if you just specify full paths to those files (both the save and server-settings.json) ... for example --start-server "C:\Users\Brick\AppData\Roaming\Factorio\server.zip", or --start-server "C:\My Factorio Saves\server.zip" ... wherever you put it.
For one thanks for the reply, I just went down the list of stuff you had written and so far it does sadly not change anything. Also on the note of the save and server settings location i did move it into the Factorio\bin\x64 folder mainly because it meant that i didn't have to put the full address in Start.bat and that i could be lazy by using the ".\save\[filename].zip". At the cost of just making a copy of the saves IN the x64 folder.


Having tested if it makes a difference even the very location of start.bat or the save files for that matter. It does not seem to make a difference what so ever. Also i have never had any files IN the temp directory i checked it multiple times, either they are hidden or it is just empty.

Therefor i will add a zip file(With the log from the server) with all the contents of the server including the map since it was a scenario that was saved from however i did try to load a normal map which gave me the same error as reported earlier.

Re: Headless Server: writing Permission denied

Posted: Sun Oct 23, 2016 9:17 pm
by posila
Ah ... I see the problem. You unzipped a save, changes something in it and zipped it again. That produces save that is not currently loadable (should be fixed in next release).

I attached save that is re-zipped in a way that is loadable.

Re: Headless Server: writing Permission denied

Posted: Sun Oct 23, 2016 9:39 pm
by Brick
Yep that fixed the problem alright. Thanks for the help :D
And just out of wild curiosity what does change then? given that in theory the files stay the same.

Re: Headless Server: writing Permission denied

Posted: Mon Oct 24, 2016 9:39 am
by posila
It is folders in the zip. Zip stores folders as files that have name with "/" as last character and Factorio didn't like this. But folders don't need to be in a ZIP at all, because file names already contain full path.

Re: Headless Server: writing Permission denied

Posted: Mon Oct 24, 2016 12:26 pm
by Brick
Hmm Interesting so the only reason why it was in a zip file was most likely to compress it then or is it just easier to work with this way?