If you are interested in trying it out, I’ve attached the sandbox HERE You will have to make some users and groups for the script to work. It’s all part of the game.
I return to my studies this evening finding I still need further clarification from Shevek, as I desire to understand things conceptually, not just in application. It is a discouraging process. I found myself somewhat certain a “sticky bit” makes it so others cannot delete another users file created in that directory. Shevek assures me, as always, this is partially correct. He replies when I ask for confirmation:
The sticky bit on a directory allows users to create files there but restricts deletion or renaming to the file’s owner, the directory owner, or root.
The devil seems always to be in the details of how things are defined with computers
I forget who brought up umask first, LFS207 or Shevek, or me, but I stumbled upon another trap in this sandbox. Shevek had me run a script that made a text document and the script set its umask value to 077. The mission stated I was to make no permissions for others, and a minimum of group readable. The task seemed to easy, I simply ran chmod 660 on the file. The follow up question, the trap, however was, why did it initially have r-------- permissions. The solution lay in the umask value. Shevek pointed out yet another blind spot. I was only aware umask could be set by the user and per session, unless reconfigured to do otherwise. I was not aware it could be included in a script.
I was so used to doing things the chmod way, I’d forgotten how to change group ownership as well, using chown. Shevek provided me with some hints, and I was back on track. I am not fluid yet, but I’m getting there.
I also learned about the power of the export command. Shevek usually spices things up by adding something I might not know into the mix. I was unaware variables could be exported in such a way.
I encountered another curve ball. Mission objective: find a file that’s not in your path. But how? After much contemplation, I asked Shevek for the answer. I was eager to learn a new method for employing find. Find / -name