How to use ftp_chmod function using php?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Exequiel
    Contributor
    • Jul 2012
    • 288

    How to use ftp_chmod function using php?

    I tried to use ftp_chmod function in php, but i got this kind of error, and i tried lots of way that i got in the internet its still not working.
    I got this error warning

    Warning: ftp_chmod(): 'SITE': command not understood in C:\xampp\htdocs \gcc_cems\ftpup load.php on line 23

    heres my code
    Code:
    if (ftp_chmod($connect, "0777", "CCTV/".$filename) !== false) {
        echo "chmoded successfully";
      } else {
        echo "could not chmod";
      }
    SOmeone knows this function?
  • Oralloy
    Recognized Expert Contributor
    • Jun 2010
    • 988

    #2
    Exequiel,

    You might not be able to run the remote chmod command, if it is not supported.

    Try executing this over a command line FTP connection to see what the output is:
    Code:
    chmod 777 CCTV/file-name
    Good Luck!
    Oralloy

    Comment

    Working...