Use openssl or gnupg to encrypt and decrypt things such as password, password text files and whole files that you can use after as input to your bash script.
Just keep your keys in a secure location and don’t use the same key for all files !
For this instance, would it be possible to set the owner and group of the My_Sounds folder to the user you are running the script as? That would allow your user to create any files you want under that folder without full access to other areas of the disk.
You’ll probably get a much better answer if you poke around Google, but I will give it a shot and try to hit the high points on this.
Traditional Unix/Linux security has 3 groupings - owner, group, and world.
Owner permissions are for a single user - the owner. There are a few things that only the owner can do to a file, and you’ll run into one of those occasionally.
Group permissions apply to anyone who is in the group. It might be a little confusing - there is a user account and a group with the same name for each user. If you are managing groups a little more carefully, you might create a group named “soundwriters” and use that so several accounts can write to the same folder.
World permissions are for everyone.
To start with, you need to know about read, write, and execute permissions. There are some subtleties, but these will get you 90% of the way. Generally, you turn off write permissions to world to most files, and that protects your data (and scripts) from being tampered with.
You can also turn off read permissions for world if you want to protect a file from being read.
The executable flag marks a file as executable. If not set, the OS won’t allow the file to be directly executed.
Hope all that didn’t confuse you! Read around on the web. The concepts are not too difficult, and well worth knowing.