We’ve recently found a use for this enhancement for our internal testing purposes. The use case is as follows:
We run PTL tests as a non-root user on our internal test systems, there are some pbs_snapshot tests and we’d like to be able to run them as a non-root user as well. We have sudo rules in place which restrict some of the commands that pbs_snapshot executes (like chmod) from being run with sudo. So, it’d really help if we add a switch to pbs_snapshot so that it runs only the necessary commands with sudo and runs the other commands as a normal user.
So, I’m reopening this discussion. Let’s figure out the most generic way to enhance pbs_snapshot for such use cases.