I'd like some help please. I have this PHP script inside my Post_model constructor
$dir = FCPATH . 'uploads' . DIRECTORY_SEPARATOR . 'posts';
if (!is_dir($dir)) {
mkdir($dir, 0755, true);
}
which shows me this error:
Severity: Warning
Message: mkdir(): Permission denied
The main idea is that the project has the ability to create users and these users can upload images, or create folders-albums which are stored in the uploads folder.
I've been struggling to fix this error the last days and can't find a solution. I have tried this code and on Windows and works great, but not on Linux (Ubuntu 14.04)