Hi,
I’d like to create files with certain permissons, especially g+w. With the following code:
Char_t *sf = gSystem->ExpandPathName(“newfile”);
Int_t umask = gSystem->Umask(n);
TFile *fFile = new TFile(sf, “UPDATE”);
gSystem->Umask(umask);
I may create a file with the umask “n”. However, this only works for removing permissions from the default value of 022. But it is not possible to give permissions which are not part of the default.
According to the source code, Umask() simply calls the unix command umask, so I’m a little bit puzzled.
On the other hand, setting a Umask(n) in root and then creating a file in a shell opened with “.!/bin/bash” provides exactly the permissions “n” to that file.
How may I overcome this, or where may I change the default value for umask?
Cheers,
Stefan