allenai / allenai/ir_datasets

Permissions error on /tmp/ir_dataset directory due to multiple users on the same server

Offen
#206 5 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Python
Sterne
391
Forks
58
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Describe the bug**
When more than one users on the same server or device use the ir_datasets to fetch documents, then the permission denied error might be encountered if one of the users does not have write access to the already created directory

**Affected dataset(s)**
This issue does not affect datasets

**To Reproduce**
Steps to reproduce the behavior:
1. User A runs a script that imports some documents using ir_datasets
2. User B who is on the same system performs the same actions
3. User B is part of the Others group in the system and hence does not have write permissions to the already existing /tmp/ir_datasets directory
4. User B sees the following error:
```PermissionError: [Errno 13] Permission denied: '/tmp/ir_datasets/tmp3sn3tbic'```

**Expected behavior**
When multiple users are using the package on the same device, some additional checks would need to be in place to avoid permission errors. For example, the ir_directory directory that is created for tmp files could be prefaced by a username to avoid such conflicts.

**Additional context**
This issue can be bypassed by utilizing the IR_DATASETS_TMP environment variable.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.