Problems updating file

Dear experts,

I have some trouble updating a root file, which I guess is related to file name/path length. If I try to open /afs/
in read mode everything is fine, while I cannot open it in update mode. Running gSystem->ExpandPathName I see that the path returned is limited to 128 characters. To me it seems that this causes then gSystem->AccessPathName to crash. Is there any hard limit within TSystem as I though linux’ file name length is limited by 255 characters.
Just to add: file permissions are set correctly and if I copy the file somewhere else everything works well.


Hi Marcus,

Which version of ROOT is this? And where do you see this limitation of 128 characters? I cannot reproduce this…

Does EOS allow you to touch anything in this directory? Does this work, on the shell:
touch /afs/


Hi Alex,

it’s root 6.04.16 compiled against gcc 4.9. Touch works. I also just noticed that I posted the wrong file name. It’s actually /afs/
while gSystem->ExpandPathName() reduces it to /afs/ which is 128 characters long. That’s why I thought it might be related somehow.


Hi Marcus,

That’s an artifact of the value printing in ROOT 6.04; that was changed in later versions. In 6.04, strings get cut, signaled by a trailing .... If you call printf() you’ll see the full string:

printf("%s\n", gSystem->ExpandPathName("/afs/"))
(int) 201

So that’s not it.

How do you determine that you cannot open it in Update mode?

Just for a test, can you copy it some place else and open it there in update mode? I.e. is the an issue with the file location or the file itself?


Hi Alex,

good to know. I notice it because TFile::Open returns a null pointer and print this error message
can not be opened (Input/output error)
Opening it with read it is just fine. Also if I copy the file e.g. in my home, it works fine as well. Looking through TFile::Open the problem seems to come from AccessPathName which returns false.


Hi Marcus,
Weird! Could you post the precise error message, and the output of ls -l /afs/ in the shell?

Hi Alex,
indeed. Here the two outputs:

root [0] TFile::Open("/afs/ in <TFile::TFile>: file /afs/ can not be opened (Input/output error)
(class TFile *) 0x0


-rwxr-xr-x. 2 morgens zp 416225778 Apr  1 11:58 /afs/


This looks all good. @pcanal - do you have an idea?

Or maybe @ganis has an idea?


I cannot reproduce the problem on lxplus, same ROOT version, EOS mounted in my HOME directory: I can create a file close it, and updated later on.
When I try to open the file in question I get an ‘Operation not permitted’ error which is expected:

$ root -b
 | Welcome to ROOT 6.04/16       |
 |                               (c) 1995-2014, The ROOT Team |
 | Built for linuxx8664gcc                                    |
 | From tag v6-04-16, 17 March 2016                           |
 | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
 root [0] auto f = TFile::Open("/afs/", "UPDATE")
 SysError in <TFile::TFile>: file /afs/ can not be opened (Operation not permitted)

I suspect a problem on the EOS side. The error (Input/output error) I think comes from Fuse.
Can you retry after setting

 export EOS_FUSE_DEBUG=1

to see if you get more hints?

Note also that AccessPathName returns false when things are ok. For this file AccessPathName returns false all the possible flags: kReadPermission, kWritePermission, kExecutePermission.


thanks a lot for the reply. Indeed, it seems to be an issue with eos. Unfortunately, EOS_FUSE_DEBUG=1 doesn’t print any further information. I tried using auto mounted eos on lxplus and it didn’t work either. Using xrootd, ie. yields this error message:

error in TNetXNGFile::Open: [ERROR] Server responded with an error: [3005] Unable to access quota space /eos/atlas/user/m/morgens/datasets/Tau3Mu/ntuples/WmunuCR/v30/ntuple-data15_13TeV_periodJ_1.root; Machine is not on the network

Is this any helpful? Funny enough, sometimes (not changing) the machine it works, though, but there is no pattern I could figure out when it does work and when not.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.