PP-1009 : Enhancing sudo usage in PTL

@kjakkali, I am confused. in EDD you still say following at the top

Enhancements:

  • New interface to create a temporary file
  • update file copy operation to not keep original permission by default this will avoid additional chmod

But the default for new interface is “preserve_permission=True”.
Also this whole bug is about additional chmod | chown operation and unwanted sudo rules.

"For file copy operation PTL does copy file with keeping original permission and then change owner and permissions of file"
So can you tell me how are you going to address the original issue?

@anamika : Thanks.

I have updated the ‘Enhancements’ section of design doc. So using new parameter user can avoid additional chown,chgrp and chmod operations.

If user calls run_copy(preserve_permission=False) then run_copy() will cop files without -p flag so the copied file will get destination permissions.
In library we will use run_copy with preserve_permission=False flag.

Please review the updated doc and let me know your inputs.

Thanks Kumar. Just noting our offline discussion that no other library interfaces needs to be updated. run_copy will be called with “preserve_permission=false” to achieve this issue.
EDD looks good to me.

@kjakkali
I’m still happy with the changes. I sign off.

@bhroam , @anamika : Thank you.

It seems there is a utility DshUtils.mkdtemp() that is affected too that uses chown and chmod. Will this and possibly other utilities under fw/ptl/utils that use chown and chmod get covered by these changes too?