Here's a chMod script that may come in helpful for people. Particularly web hosts working on a filemanager that needs to include some way to change file permissions:
<?php
// set the variables
$file = "filename.extension";
$ftp_server = "www.subdomain.domain.whatever";
$ftp_user_name= "username";
$ftp_user_pass= "password";
$ftp_server = $ftp_user_name . '.cjb.cc';
// set up basic connection
$conn_id = ftp_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// try to chmod $file to $chmod
$chmod_cmd="CHMOD " .$ftp_chmod ." " .$file;
$chmod=ftp_site($conn_id, $chmod_cmd) or die("Problem with script");
// close the connection
ftp_close($conn_id);
?>
Hope that this helps someone out. Obviously, you can modify it so that the variables are set with a form.


