parameters: (path, owner, group=-1)
docstring: Recursively chown a path and contents to owner.
      https://docs.python.org/3/library/shutil.html
docstring_summary: Recursively chown a path and contents to owner.
      https://docs.python.org/3/library/shutil.html
docstring_tokens: Recursively chown a path and contents to owner . https : // docs . python . org / 3 / library / shutil . html
function: def recursive_chown(path, owner, group=-1):
      """
      Recursively chown a path and contents to owner.
      https://docs.python.org/3/library/shutil.html
      """
      for dirpath, dirnames, filenames in os.walk(path):
          try:
              shutil.chown(dirpath, owner, group)
          except PermissionError:
              print('Could not change permissions for: ' + dirpath + ' to: ' + owner)
              pass
          for filename in filenames:
              try:
                  shutil.chown(os.path.join(dirpath, filename), owner, group)
              except PermissionError:
                  print('Could not change permissions for: ' + os.path.join(dirpath, filename) + ' to: ' + owner)
                  pass
function_tokens: def recursive_chown ( path , owner , group = - 1 ) : for dirpath , dirnames , filenames in os . walk ( path ) : try : shutil . chown ( dirpath , owner , group ) except PermissionError : print ( 'Could not change permissions for: ' + dirpath + ' to: ' + owner ) pass for filename in filenames : try : shutil . chown ( os . path . join ( dirpath , filename ) , owner , group ) except PermissionError : print ( 'Could not change permissions for: ' + os . path . join ( dirpath , filename ) + ' to: ' + owner ) pass