I am trying to create dirs for storing photo-albums per directory. I can create these with mkdir(). But I am not able to access those folders (cannot upload anything there). I am getting Permission Denied. I have the following line: mkdir (newfolder, 0777);