I have a script that automatically creates a directory if it doesn't exist and sets permissions to 777. The problem is, it's only setting permissions to 755:
if (!file_exists($this->get_upload_dir())) mkdir($this->get_upload_dir(), 0777);
If I check the owner of the directory it created, it shows
www-data . I'm not sure what the 33 means. Is
www-data the user the server uses to create directories? If so, how can I allow it to create a directory with 777 permissions?
Also note, I have already set the following command:
sudo chown -R www-data:www-data /var/www/html