Deprecated: Creation of dynamic property wpdb::$categories is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/wp-db.php on line 668

Deprecated: Creation of dynamic property wpdb::$post2cat is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/wp-db.php on line 668

Deprecated: Creation of dynamic property wpdb::$link2cat is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/wp-db.php on line 668

Deprecated: Return type of WP_Theme::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-theme.php on line 554

Deprecated: Return type of WP_Theme::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-theme.php on line 595

Deprecated: Return type of WP_Theme::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-theme.php on line 535

Deprecated: Return type of WP_Theme::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-theme.php on line 544

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /usr/home/bugyo/public_html/b-log/wp-includes/comment-template.php on line 1739

Deprecated: Return type of WP_REST_Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/rest-api/class-wp-rest-request.php on line 960

Deprecated: Return type of WP_REST_Request::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/rest-api/class-wp-rest-request.php on line 980

Deprecated: Return type of WP_REST_Request::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/rest-api/class-wp-rest-request.php on line 992

Deprecated: Return type of WP_REST_Request::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/rest-api/class-wp-rest-request.php on line 1003

Deprecated: Return type of WP_Block_List::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-block-list.php on line 151

Deprecated: Return type of WP_Block_List::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-block-list.php on line 175

Deprecated: Return type of WP_Block_List::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-block-list.php on line 164

Deprecated: Return type of WP_Block_List::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-block-list.php on line 186

Deprecated: Return type of WP_Block_List::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-block-list.php on line 138

Deprecated: Return type of WP_Block_List::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-block-list.php on line 75

Deprecated: Return type of WP_Block_List::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-block-list.php on line 89

Deprecated: Return type of WP_Block_List::offsetSet($index, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-block-list.php on line 110

Deprecated: Return type of WP_Block_List::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-block-list.php on line 127

Deprecated: Return type of WP_Block_List::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-block-list.php on line 199

Deprecated: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/wp-db.php on line 3030

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-term.php on line 198

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-term.php on line 198

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-term.php on line 198

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-term.php on line 198

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-term.php on line 198

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-term.php on line 198

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-term.php on line 198

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/bugyo/public_html/b-log/wp-includes/class-wp-block-list.php:14) in /usr/home/bugyo/public_html/b-log/wp-includes/feed-rss2.php on line 8
ftpd – B-LOG https://blog.bugyo.tk/b-log bugyoのlog。決してblogではない。 Thu, 13 Aug 2009 07:01:38 +0000 en-US hourly 1 https://wordpress.org/?v=5.7.2 FTPクライアントでファイル一覧が表示されない https://blog.bugyo.tk/b-log/archives/414 https://blog.bugyo.tk/b-log/archives/414#comments Fri, 31 Jul 2009 17:25:42 +0000
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /usr/home/bugyo/public_html/b-log/wp-includes/category.php on line 383
http://www.kitcc.org/~bugyo/b-log/?p=414 Continue reading FTPクライアントでファイル一覧が表示されない]]> 管理しているサーバに「FFFTPからアクセスすると中身が見えない」と報告があった。

ログをもらうとログイン、ファイル一覧の取得は「226 Transfer complete.」となっていて正常に完了した様子。

ブラウザからFTPプロトコルで接続してみるとファイル名が時刻や年と一緒になった「2007 hoge」のような名前になっている。

取得してきたファイル一覧をうまく解釈できていないよう。

そこで、正常にアクセスできる同環境のftpdとファイル一覧の形式を比べてみた。
問題になっているftpdは

-rw-r--r--   1 root   wheel          93  3 22 20:27 filename

という形式で、正常なftpdは

-rw-r--r--  1 root    wheel          93 Oct 23  2006 filename

という形式になっている。

もっと大胆に崩れているかと思ったけど、月の表示形式が名称の短縮名になっているか否かぐらいしか違いがない。

FTPのLISTコマンドはサーバ側の/bin/ls -lの出力に依存する。

サーバ側でls -lとすると月が数字で表示された。

これを短縮名で表示させるにはどうしたらいいだろうか。

ちょうどIRCで話していた経験者に聞くとローケルによって変わると教えてくれた。

そのときは一般ユーザからsuしたのでLC_ALL=ja_JP.eucJPになっていた。

# unsetenv LC_ALL && ls -l

としてみると短縮名で表示されるようになった。

と、そこで

# /etc/rc.d/inetd restart

としたことを思い出した。

つまり、環境変数は親プロセスから子プロセスに引き継がれるので、LC_ALLが一般ユーザ→ルート→inetd→ftpdと引き継がれて/bin/ls -lの出力をクライアントの対応していない形式にしてしまったということだった。

# (unsetenv LC_ALL; /etc/rc.d/inetd restart)

とすると問題は解決した。

]]>
https://blog.bugyo.tk/b-log/archives/414/feed 1