Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.
/ party Public archive

Cannot successfully access same database with two different system users #13

Open
medikoo opened this issue Feb 15, 2016 · 4 comments
Open

Comments

@medikoo
Copy link

medikoo commented Feb 15, 2016

If, when logged in as user A, I initialize database, and then when I try to connect to same database using user B, no data is propagated, and no error (that would indicate that something went wrong) is exposed.

How to reproduce:

Try to run below code on database initiated by other user. No logs will be reported, as if operation hanged. Same code will run as expected when run by user which initialized first access.

'use strict';

var level = require('level-party');
var db = level(pathToLevelDbFolder);

var stream = db.createReadStream();
stream.on('data', function () {});
stream.once('error', function (err) {
    console.log("Error", err.stack);
});
stream.once('end', function () {
    console.log("End");
});
@medikoo medikoo changed the title Using level-party by two different system users doesn't work Cannot successfully access same database with two different system users Feb 15, 2016
@vweevers
Copy link
Member

vweevers commented Dec 8, 2019

Which platform?

@vweevers vweevers added bug Something isn't working more information needed Further information is requested labels Dec 8, 2019
@theprojectsomething
Copy link

Can confirm same issue on node 15.2.1 / ubuntu server 20.04.1. No errors. Switching level-party for level gives the standard LOCK error

@theprojectsomething
Copy link

theprojectsomething commented Jan 27, 2021

Actually it looks like a permissions error, specifically:

Error [OpenError]: IO error: /{path}/LOCK: Permission denied

My scenario is a node script running as a service (webserver) ... this creates and updates the original database (as root). All DB files are created with 0644 permissions. I am then attempting access as another user (for manual checkup / data dump). Sudoing the user script works as expected.

If the db is initially created by the non-root user, everything works as expected.

@theprojectsomething
Copy link

@vweevers any suggestions here? This is still an issue for us .. assume we can manually chown to a group after creation but is same possible with LOCK files?

@vweevers vweevers added this to Level Feb 10, 2023
@vweevers vweevers moved this to Backlog in Level Feb 10, 2023
@vweevers vweevers removed this from Level Dec 2, 2024
@vweevers vweevers removed bug Something isn't working more information needed Further information is requested labels Dec 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants