I don't have a precise answer for your exact situation, but can give a bit of info until you get a better response. Usually the two easiest ways to resolve permission issues is to either 1. Change the permissions of the directory that is causing issues or is to be written to. You can check the permissions by doing "ls -ld <dir name>" or from within the directory by "ls -ld ." You can change permissions by "chmod 777 <dir>". 777 is a brute force thing and gives permission to everybody. The second most common way to fix is by running the command as root or using sudo. When issuing commands like this, it uses the permission settings of the root account which can usually write everywhere.
I don't recommend trying any of the above willy-nilly though if you are uncertain. Just wait for a more direct answer to your specific scenario. Good luck!