Sorry if I'm posting this at the wrong StackExchange site, but I thought this would fit better here rather than serverfault. Anyway...
I'm writing a bash script that creates folders and writes to new files within that folder. The owner of the folder in which I'm creating my folder is owned by root, and I don't want to change that. I do want to own the folder that I'm creating and any files within it, however.
So I create the folder, and naturally I then have to chown the folder to me. I also give everyone users rwx access to the folder using chmod. The problem arises when I try to use the > operator to send a mysqldump to a file in that folder. I always get 'permission denied' errors, I assume because I don't have file access to that folder. Sure enough, when I navigate to that folder in Nautilus, Folder access is set to 'Create and delete files', but File access is set to '---'.
Long story short, how would I go about setting that File access through a bash command? And if you suspect that this is not the problem, what is, and how do I solve it?
Thank you in advance!