You need a specific non-root user that sub-scripts can work with. We call this user fred. Then your root privilege script can just do
su fred /path/to/subscript-A
su fred /path/to/subscript-B
The answer of Contra nsayer, you probably can’t use nobodyfor this, because the whole point nobodyis that it has write rights to nothing. Sometimes this is exactly what you want, but I'm sure your sub-scripts should be written to the file system ...
source
share