Ubuntu 20.04 – Massive change of permissions and users to folders and files separately
With bash you can more and more…
In linux you can use the “find” command from terminal and execute a command for each result simply.
To change all subfolder permission from a folder recursively you can type:
1 |
find /home/xtr/Desktop/myFolder -type d -print0 |xargs -0 chmod 755 |
now all falders have the execution permission.
To change all files permission from a folder recursively you can type:
1 |
find /home/xtr/Desktop/myFolder -type f -print0 |xargs -0 chmod 660 |
now all files are read/write and no permission to guest
To change all files owners from a folder recursively you can type:
1 |
find /home/xtr/Desktop/myFolder -type f -print0 |xargs -0 chown myuser:mygroup |
no all files are assigned to a specific user and group