Headless Server: writing Permission denied [Solved]

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
User avatar
Brick
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Oct 19, 2016 11:50 am
Contact:

Headless Server: writing Permission denied [Solved]

Post 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.
Last edited by Brick on Tue Oct 25, 2016 7:15 am, edited 1 time in total.
I'm a brick what do you expect? A song? It's not like i have lungs.... Just don't pave me over the road ok?

User avatar
Brick
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Oct 19, 2016 11:50 am
Contact:

Re: Headless Server: writing Permission denied

Post 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.
I'm a brick what do you expect? A song? It's not like i have lungs.... Just don't pave me over the road ok?

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Headless Server: writing Permission denied

Post 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.

User avatar
Brick
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Oct 19, 2016 11:50 am
Contact:

Re: Headless Server: writing Permission denied

Post 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.
Attachments
Factorio Server Brick.zip
Server(Log, Save, Settings and Start.bat)
(10.45 MiB) Downloaded 105 times
I'm a brick what do you expect? A song? It's not like i have lungs.... Just don't pave me over the road ok?

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Headless Server: writing Permission denied

Post 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.
Attachments
34822_server_fixed.zip
(10.31 MiB) Downloaded 108 times

User avatar
Brick
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Oct 19, 2016 11:50 am
Contact:

Re: Headless Server: writing Permission denied

Post 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.
I'm a brick what do you expect? A song? It's not like i have lungs.... Just don't pave me over the road ok?

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Headless Server: writing Permission denied

Post 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.

User avatar
Brick
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Oct 19, 2016 11:50 am
Contact:

Re: Headless Server: writing Permission denied

Post 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?
I'm a brick what do you expect? A song? It's not like i have lungs.... Just don't pave me over the road ok?

Post Reply

Return to “Technical Help”