You are here: Re: FTP Chmod problem « PHP « IT news, forums, messages
Re: FTP Chmod problem

Posted by Al on 09/06/05 19:35

Matt Palermo wrote:
> Hello everyone. I have a script where I am using FTP functions to chmod
> files/folders. I'm running into a problem with the ftp_chmod() function
> when trying to change the permissions of a directory. Here is the code I'm
> using:
>
> ftp_chmod($connId, 0777, $folder);
>
> The function almost works, but when I check the permission of the folder
> after it's run, the folder has 410 for permissions instead of 777. So, it
> is changing the permissions, but not to the correct value. Now when I use
> the following code, it seems to work fine:
>
> $chmodCmd = "CHMOD 0777 ".$file;
> ftp_site($connId, $chmodCmd);
>
> This properly changes the folder permissions to 777. Does anyone know why
> the ftp_chmod() function doesn't work correctly? As a side note, the
> ftp_chmod() function works correctly on a file, but not a directory. Any
> help is appreciated.
>
> Thanks,
>
> Matt Palermo
> http://sweetphp.com


Which php version are you using? PHP 4x does not have ftp_chmod(); It does have ftp_site()

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация