Say I have the following folder structure
folder/
├─ subfodler_2/ #User1
├─ subfolder_3/ #User2
├─ subfolder_1/ #User1
where I want to chmod all the folders (and files) created by User1 to, say, 777.
I know I cant get the files by
ls -la | grep User1
and I know how to chmod a specific folder, but I don't know how to "use the output" of ls i.e parse it to chmod afterwards.
It does not have to be a one-liner if I can write it as a bash-script it would be fine aswell