You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Mikhail T." <mi...@aldan.algebra.com> on 2011/07/19 18:13:28 UTC

mod_ftp's handling of SITE UMASK command

Hello!

One of our scripts is using ncftpput to automatically upload a file. The script 
invokes ncftpput with a -U flag to explicitly set the umask.

Though the file is successfully uploaded (with the default umask) there is with 
a warning:

    % ncftpput -U 0 localhost / /COPYRIGHT
    ncftpput could not set umask: server said: Error (no message)

and the server logs the following:

    127.0.0.1 - - [18/Jul/2011:17:16:06 -0400] "SITE UMASK 0" 504 - "-" "-"

Looking inside the code (ftp_commands.c), I see, that the SITE-command is not 
implemented:

         ftp_hook_cmd("SITE", *NULL*, FTP_HOOK_LAST,
                      FTP_NEED_LOGIN | FTP_TAKE1 | FTP_EXTENSIBLE,
                      "<sp> site-cmd [ <sp> arguments ]");

I wonder, if that's intentional -- perhaps, for reasons of security -- or simply 
because nobody got to it yet. Please, advise. Thanks! Yours,

    -mi


Re: mod_ftp's handling of SITE UMASK command

Posted by yanqi gao <ga...@gmail.com>.
I don't install the module mod_ftp.My apache version is 2.2.19,and the
access_log just like this:
192.168.6.215 - - [20/Jul/2011:10:32:12 +0800] "GET /index.html HTTP/1.1"
304 -
192.168.6.215 - - [20/Jul/2011:10:32:12 +0800] "GET /jquery-1.6.1.js
HTTP/1.1" 200 234995
Thank you all the same!

On Wed, Jul 20, 2011 at 12:13 AM, Mikhail T. <mi...@aldan.algebra.com>wrote:

>  Hello!
>
> One of our scripts is using ncftpput to automatically upload a file. The
> script invokes ncftpput with a -U flag to explicitly set the umask.
>
> Though the file is successfully uploaded (with the default umask) there is
> with a warning:
>
> % ncftpput -U 0 localhost / /COPYRIGHT
> ncftpput could not set umask: server said: Error (no message)
>
> and the server logs the following:
>
> 127.0.0.1 - - [18/Jul/2011:17:16:06 -0400] "SITE UMASK 0" 504 - "-" "-"
>
> Looking inside the code (ftp_commands.c), I see, that the SITE-command is
> not implemented:
>
>     ftp_hook_cmd("SITE", *NULL*, FTP_HOOK_LAST,
>                  FTP_NEED_LOGIN | FTP_TAKE1 | FTP_EXTENSIBLE,
>                  "<sp> site-cmd [ <sp> arguments ]");
>
> I wonder, if that's intentional -- perhaps, for reasons of security -- or
> simply because nobody got to it yet. Please, advise. Thanks! Yours,
>
> -mi
>
>