key4hep / key4hep-tutorials

Key4hep tutorials
Apache License 2.0
0 stars 6 forks source link

Input file permissions too strict? #11

Open Zehvogel opened 2 weeks ago

Zehvogel commented 2 weeks ago

In principle this part https://github.com/key4hep/key4hep-tutorials/blob/2a8ba424f71b5ba41e9c8a6b2a3a4c01f1b7a9d7/edm4hep_analysis/.solution/make_plots.py#L12-L13 of the edm4hep analysis can be simplified to work from anywhere without downloading the files and without having eos mounted as a file system by directly using the respective root: url. E.g.

reader = root_io.Reader("root://eosproject.cern.ch//eos/project/k/key4hep/www/key4hep/tutorial/zh_mumu_filtered/higgs_recoil_from_gaudi_*.edm4hep.root")

even with the globbing as the underlying TChain can handle this directly. On my CERN machine with kerberos this works, but on a different machine without I get

[...]
Error in <TNetXNGSystem::GetDirEntry>: Unable to open directory /eos/project/k/key4hep/www/key4hep/tutorial/zh_mumu_filtered; Operation not permitted
[...]

When trying to access the files directly

reader = root_io.Reader([f"root://eosproject.cern.ch//eos/project/k/key4hep/www/key4hep/tutorial/zh_mumu_filtered/higgs_recoil_from_gaudi_{i}.edm4hep.root" for i in range(10)])

the error message changes to

Error in <TNetXNGFile::Open>: [ERROR] Server responded with an error: [3010] Unable to access - public access level restriction /eos/project/k/key4hep/www/key4hep/tutorial/zh_mumu_filtered/higgs_recoil_from_gaudi_0.edm4hep.root; Permission denied

Is there a way for us to change the eos permissions on the respective directory such that this unauthenticated access works?

PS: What always works and still might be useful to some is:

reader = root_io.Reader([f"https://key4hep.web.cern.ch/key4hep/tutorial/zh_mumu_filtered/higgs_recoil_from_gaudi_{i}.edm4hep.root" for i in range(10)])
jmcarcell commented 2 weeks ago
reader = root_io.Reader("root://eosproject.cern.ch//eos/project/k/key4hep/www/key4hep/tutorial/zh_mumu_filtered/higgs_recoil_from_gaudi_*.edm4hep.root")

But to do this you need to have EOS mounted, right? A kerberos ticket is not enough for this to work.

Zehvogel commented 2 weeks ago

But to do this you need to have EOS mounted, right? A kerberos ticket is not enough for this to work.

No, as far as I understand this just opens the file remotely via xrootd