.
you can always use the exec() and command() functions. they communicate directly with the shell. example:
exec("su;$password;cd $path;mkdir $mkDir;exit");
or something like that. you can also do chmod, chgrp, chown, and stuff... just like you would in a normal shell. Hope that helps you out.
not sure if su can work that way, cause i've never tried it, but its a shot in the dark...