File read/write permissions within eSASS Docker container

eSASS download and installation
Post Reply
joheen
Posts: 2
Joined: Fri Sep 22, 2023 1:49 pm

File read/write permissions within eSASS Docker container

Post by joheen »

Hi,

I'm using the eSASS Docker container following Section 3.2 of https://erosita.mpe.mpg.de/edr/DataAnal ... _container

Say I have my data stored in /mnt/user/data/, where I have various eROSITA event lists stored. Then to run the container I enter:
docker run --volume /path/to/caldb:/home/idies/caldb --volume /mnt/usr/data:/data -it --rm erosita/esass-minimal:latest /bin/bash

Great, within the container I can see the files are present in /data/ and it appears the eSASS tasks are recognized. The problem arises when I try to run them from within /data/, e.g. by running
flaregti fm00_700201_020_EventList_c001.fits

I am faced with the error: "flaregti/flaregti_mod: **STOP** Cannot open event file"

If I try "touch fm00_700201_020_EventList_c001.fits" I get a "Permission denied". And I can't run "sudo touch fm00_700201_020_EventList_c001.fits", because I don't know the password for idies. The same problem happens if I try to create and write to a new file within /data, Permission Denied.

Apologies if this is a basic Docker question, I am unfamiliar with the platform before this. Thanks in advance!
User avatar
AlainGueguen
Posts: 32
Joined: Mon Jun 28, 2021 12:06 pm

Re: File read/write permissions within eSASS Docker container

Post by AlainGueguen »

Dear Joheen

I suspect your problem comes from the internal path you have chosen:

--volume /mnt/usr/data:/data

By doing this, you mount your data folder at the root of the docker file system, and you can write at this level (the docker run a Linux system).

I suggest to change the second "volume" option to point to a (sub)folder in the docker user (idies) home folder /home/idies/
So something like:
--volume /mnt/usr/data: /home/idies/data

This should allow you to read, create and modify files in the mounted folder.

Regards
Alain on behalf of the eSASS team
joheen
Posts: 2
Joined: Fri Sep 22, 2023 1:49 pm

Re: File read/write permissions within eSASS Docker container

Post by joheen »

Thank you for the suggestion! It made me realize that the error was even simpler than thisy. The permissions on /mnt/usr/data were set to "drwxrwxr-x", while I didn't realize I needed the "other" permission set to "rwx". Once I changed this I am able to modify and create files within the container, whether in /home/idies/data or even just /data.

Thanks,
Joheen
Post Reply