Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

couldn't create .lock file: permission denied #388

Open
QuinveY opened this issue Apr 20, 2021 · 2 comments
Open

couldn't create .lock file: permission denied #388

QuinveY opened this issue Apr 20, 2021 · 2 comments

Comments

@QuinveY
Copy link

QuinveY commented Apr 20, 2021

I have been using factorio server on windows for quite a while now, and I wanted to be able to automate the updating process of factorio. For this I am using a vm of ubuntu with docker.
But I having problems with the initial install. I'm using this modified quick-start command:

sudo docker run -d -it \
  -p 3333:3333/udp \
  -v /mnt/Factorio/factorio:/factorio \
  -e "PORT=3333" \
  -e LOAD_LATEST_SAVE=false \
  -e SAVE_NAME=onlineServer \
  --name factorio \
  --restart=always \
  factoriotools/factorio

comments on this:

  • I am copying the savefile over from my windows server.
  • I have to use an other port than the basic one, because of my other settings in router. (with port 3333 enabled, my windows server had no problems working ever)
  • I am mounting a folder from my NAS, so that I can acces the save-files, mods and server settings via other pcs.

When I check the logs, there is an error report "0.000 Error Util.cpp:83: Couldn't create lock file /factorio/.lock: Permission denied."
This causes factorio to endlessly restart, but never actually work.

I have set the permissions on the mount to the reccomended 845:845 and with the first run of this command posted above the folderstructure is being made.

does anybody have a clue what to do? hope so!

Kind regards,
Q

@bplein
Copy link

bplein commented Jun 29, 2021

did you chown 845:845 /mnt/Factorio/factorio followed by chmod 755 /mnt/Factorio/factorio ?

@perobertson
Copy link

You would need to run sudo chown -R 845:845 /mnt/Factorio/factorio on the host so that all files and directories are updated to the expected user and group.

Also some searching for Error Util.cpp:83: Couldn't create lock file shows that this happens on occasion. You could also try to fetch the latest image with docker pull factoriotools/factorio:latest to see if that fixed the issue for you.

You could also try deleting the entire /mnt/Factorio/factorio directory and starting again if you do not have any saves or other information in there that you want to keep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants