Password protection of TFile?

Dear Rooters

It would be great if there would be a possibility to allow only users
to open or even update a TFile who have a username and password.
Since TFile does not offer this possibility, is there any other way
to achieve this?

Best regards
Christian

Hi,
I think the esiest solution is to create your own
class MySecretFile : public TFile
with Open method overloaded.

Regards. Valeriy

Dear Valeriy

I know, but this is exactly what I want to avoid.
Is there a reason, why TFile does not offer this possibility?

P.S.:I assume that the DBs (Oracle, MySQL) which are used to build the
catalogs, are all used with username/password, but this password does not
make sense when everybody can access the TFiles?

Best regards
Christian

I’m just shooting out this one at random… but I remember that TNetFile used something of a username+password combination to access a file throught the Network. Perhaps you might want to try it out, using the file:// protocol, instead of the usual http:// or ftp:// , for acessing local files?

Thank you for this information, which is also explained in:
root.cern.ch/root/NetFile.html
For some reason I missed it because until now I did not have time to
try to work with TNetFile. It could be what I wanted to know.

Best regards
Christian