PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<ftp_chdirftp_close>
view the version of this page
Last updated: Thu, 21 Aug 2003

ftp_chmod

(PHP 5 CVS only)

ftp_chmod -- Set permissions on a file via FTP

Description

string ftp_chmod ( resource ftp_stream, int mode, string filename)

Sets the permissions on the remote file specified by filename to mode given as an octal value.

Returns the new file permissions on success or FALSE on error.

See also chmod().



add a note add a note User Contributed Notes
ftp_chmod
Loup_iotte at pagesperso dot org
01-Jul-2003 01:07
if ftp_chmod doesn't work, jusdt try this :

$ftp_ip="ip_of_my_serv_ftp";
$ftp_login="my_login";
$ftp_pass="my_pass";
$ftp_file="/www/motd.txt";

$conn_id=ftp_connect($ftp_ip);
$login_result=@ftp_login($conn_id, $ftp_login, $ftp_pass);

<!-- Here's the hack -->
$chmod_cmd="CHMOD 0666 ".$ftp_file;
$chmod=ftp_site($conn_id, $chmod_cmd);


ftp_quit($conn_id);

Loup_iotte

<ftp_chdirftp_close>
 Last updated: Thu, 21 Aug 2003
show source | credits | sitemap | mirror sites 
Copyright © 2001-2003 The PHP Group
All rights reserved.
This mirror generously provided by: http://php.mirrors.ilisys.com.au/
Last updated: Sat 01 Nov 2003 04:13:36 EST EST