jplehmann/coursera — pull request #191 by arlimus (2013-09-05 19:57:09+00:00)
Title: Feature/per user temp folder

The current configuration creates cache files in `/tmp/_coursera_dl_cache/cookies`. When this path is created, the folders in *nix often have mode 0755 by default (0777 the default makedirs in python minus 0022 a common umask in *nix). This way, if the folder structure is created by user A, another user B cannot create new files inside this cache folder (missing write permission on shared folder).

This patch gets around this issue by creating per-user temporary files.

Added bonus: It also prevents other users from reading your cookies and it is still possible for the user to reuse cookies for later reconnections.