I want to find all files in a folder that have -rw-r----- (640? is that the right code?) permissions, and change them all to have -rw-rw-rw- instead. How do I do this, with chmod?
I know I could do the whole folder with
sudo chmod -R 666 /path/to/folder
but I think (perhaps mistakenly?) that it would be more efficient to just do the ones that actually need it?
Alternatively, rather than specifically looking for -rw-r-----, I could chmod any file that doesn't have 666 already? Would that be better?
chmod -R 666, since it would remove the executable bit from the folder, making it unbrowseable.chmod -R a=rwXmaybe. – fkraiem Mar 07 '19 at 10:44chmod -R +r,+wmight be best. There shouldn't be any executable stuff in that folder anyway. – Max Williams Mar 07 '19 at 10:54-R, just dochmod 666 /path/*. – fkraiem Mar 07 '19 at 10:58rw-r-----== 640 – wjandrea Mar 07 '19 at 18:57