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

Aof File Should be checked for writable at boot #66

Closed
the123saurav opened this issue Dec 11, 2021 · 1 comment · Fixed by #67
Closed

Aof File Should be checked for writable at boot #66

the123saurav opened this issue Dec 11, 2021 · 1 comment · Fixed by #67
Assignees
Labels
bug Something isn't working

Comments

@the123saurav
Copy link
Contributor

On boot, we should check if the aof file has the required permissions, else writes to it would fail.

Repro:
Change the permissions to 444 on Linux and then start the keva server.

22:18:18.450 [main] INFO dev.keva.core.aof.AOFManager - Loading AOF file
22:18:18.461 [main] INFO dev.keva.core.aof.AOFManager - Recovered 2 commands from AOF file
22:18:18.463 [main] ERROR dev.keva.core.aof.AOFContainer - Error creating AOF file
java.io.FileNotFoundException: keva.aof (Permission denied)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:237)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:158)

@tuhuynh27 tuhuynh27 self-assigned this Dec 11, 2021
@tuhuynh27 tuhuynh27 added the bug Something isn't working label Dec 11, 2021
@tuhuynh27
Copy link
Member

Thanks @the123saurav, I will add the permission check at boot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants