DIRAC icon indicating copy to clipboard operation
DIRAC copied to clipboard

Changing UID, GID or Mode for a lfn update its ModificationDate

Open calancha opened this issue 10 years ago • 12 comments

The ModificationDate is the time displayed by the fcCLI command ls, so changing above fields will change the order of the listing of one directory.

I do like if fcCLI would resemble an UNIX system, with those UID,GID,Mode changes not modifying the timestamp showed in the listing.

calancha avatar Dec 15 '15 07:12 calancha

Are there any objections by anyone to change this behaviour of the fcCLI? If not, Tino can implement it.

andresailer avatar Jan 08 '16 10:01 andresailer

That sounds like a logical thing to do... although strictly speaking it doesn't prevent me sleeping at night ;-)

phicharp avatar Jan 08 '16 11:01 phicharp

fine with me as well

chaen avatar Jan 08 '16 11:01 chaen

Thank you. I will look on it.

calancha avatar Jan 08 '16 11:01 calancha

In the DB we have defined CreationDate and ModificationDate but no ChangeTime, so the easiest way would be to not update ModificationDate when changing UID, GID or Mode: This way the listing in the fc with the option '--timeorder' will not be affected.

As in the commit below: https://github.com/calancha/DIRAC/commit/b8995450e1134fd496a3fb6730869d33c52955a3

calancha avatar Jan 28 '16 10:01 calancha

Hi, do not forget that there are several managers for files, not only this one. This modificationdate is a bit of a detail, but it is better if ll the managers behave the same way, so you would need to update the others as well

chaen avatar Jan 28 '16 10:01 chaen

Thank you for pointing out this. I am going to update the other managers too.

calancha avatar Jan 28 '16 10:01 calancha

Hi, was this fixed in the end?

fstagni avatar Jun 08 '16 15:06 fstagni

Tino is not working on (ilc)dirac any longer, his branch is still there. https://github.com/calancha/DIRAC/tree/fc_uid_gid_mode He added also the modifications for other managers, I think. I can make a PR against v6r14 or rebase to v6r15?

andresailer avatar Jun 08 '16 15:06 andresailer

This is not very trivial. I still have it on my list. I will try to do as soon as possible

atsareg avatar Jun 08 '16 15:06 atsareg

Well, what he has done is clearly wrong for the FileManagerPs

chaen avatar Jun 08 '16 16:06 chaen

Well then I leave it to Andrei.

andresailer avatar Jun 08 '16 16:06 andresailer