I required an chance to batch optimise a folder of images from the site, obviously i didn't remember the brand new images will not have the permissions 777.

Because of the wiki-type character of my website i want customers in order upload/replace the pictures!

can there be anyway i'm able to alter the permissions from the whole folder's images either having a php script or ftp program?

Use chmod() function, documentation you'll find at http://pl2.php.net/manual/en/function.chmod.php

if ($handle = opendir('/path/to/files')) {

    /* This is the correct way to loop over the directory. */
    while (false !== ($file = readdir($handle))) {
        chmod($file, 0777);


What about chmod 777 *?

Without having accessibility command-line, you need to have the ability to use among the Program execution functions for example exec

In filezilla: Choose all -> Right click -> File permissions (at the end)

with php: http://www.php.net/manual/en/function.chmod.php