<?php chmod("/somedir/somefolder", 0755); /// The easy way, but I bet it wont work system("chmod 755 /somedir/somefolder"); /// Should work ?>