Novice user here.
I have created an environment where there are three users, Tim, James and Harry.
I have created a group called Friends, which includes Tim and James. I have changed the permissions of this group using chmod 0770. Therefore the group has all capabilities (read, write, execute) and anyone outside the group has zero capabilities (i.e. Harry).
I want to automatically test that these permissions work using a script with the Harry user. I've tested it manually on one file called Homework.txt. To do this I entered: nano homework.txt, the permission was denied as expected.
If I want to create a script that carries out the same function but on different files (Photos.txt, Videos.txt, Album.txt) how would I go about doing this? Would be grateful if anyone can shed some light on this.
Thank you
touch $file
it orcat $file
it. – Kev Inski Aug 21 '18 at 04:32