I want to give full permission to a directory and its content in Ubuntu using python. I found a solution here using os.walk
:
for dirpath, dirnames, filenames in os.walk('.'):
for filename in filenames:
path = os.path.join(dirpath, filename)
os.chmod(path, 0o777) # for example
But I wonder if there isn't a more simple/elegant solution?