VyOS currently has:
which are setting permissions using stats but it would be simpler to express it in Octal and just have one function:
Taking chmod_750 as example:
> from stat import S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IXGRP > bitmask = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP > oct(bitmask) '0o750'
so chmod_750(path) could be rewritten using chmod(path, 0o750) with def chmod checking for the folder existance and calling os.chmod with the bitmask passed.