Skip to content

How to write a file to a mounted directory? #194

Answered by MCJack123
redruin1 asked this question in Q&A
Discussion options

You must be logged in to vote

CraftOS-PC has a mount_mode configuration option to control whether you can write to mounts. By default, it's set to ro strict, which means writing is entirely disabled, even if the readOnly parameter is false. This is done for security reasons (mainly to avoid arbitrary scripts from modifying files outside the sandbox). You can run config set mount_mode ro to switch it to mount read-only by default, but still allowing you to enable writing (or use rw to make it writable by default, but this is a bit dangerous).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@redruin1
Comment options

Answer selected by redruin1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants