SMBFS/CIFS - スペースを含むパスに移動できません

SMBFS/CIFS - スペースを含むパスに移動できません

Ubuntu Server 10.04 LTS を使用しており、最近 apt-get 経由で最新の samba と smbfs にアップグレードしましたが、SMB 経由で Wi​​ndows 共有をマウントすると、次のようなエラーが発生します。

root@orbital testsmb/test# mkdir "spaces test"

root@orbital testsmb/test# ll
total 5
drwxr-xr-x  3 nobody nobody    0 Aug  4 17:32 .
drwxr-xr-x 37 nobody nobody    0 Aug  4 17:24 ..
drwxr-xr-x  0 nobody nobody 4096 Aug  4 17:32 spaces test

root@orbital testsmb/test# cd spaces\ test/
dirname: extra operand `test'
Try `dirname --help' for more information.
dirname: missing operand
Try `dirname --help' for more information.
-su: [: =: unary operator expected
basename: missing operand
Try `basename --help' for more information.

root@orbital /spaces# pwd
/home/testsmb/test/spaces test
dirname: extra operand `test'
Try `dirname --help' for more information.
dirname: missing operand
Try `dirname --help' for more information.
-su: [: =: unary operator expected
basename: missing operand
Try `basename --help' for more information.

一重引用符や二重引用符を使用しても機能しません。

root@orbital /spaces# cd ..
root@orbital testsmb/test# cd "spaces test"
dirname: extra operand `test'
Try `dirname --help' for more information.
dirname: missing operand
Try `dirname --help' for more information.
-su: [: =: unary operator expected
basename: missing operand
Try `basename --help' for more information.

root@orbital /spaces# cd ..

root@orbital testsmb/test# cd 'spaces test'
dirname: extra operand `test'
Try `dirname --help' for more information.
dirname: missing operand
Try `dirname --help' for more information.
-su: [: =: unary operator expected
basename: missing operand
Try `basename --help' for more information.

以下は、サニタイズされた /etc/fstab です。

//192.168.xx.xx/winshare      /home/testsmb  smbfs   rw,credentials=/etc/samba/winshare.creds,uid=nobody,gid=nobody,auto   0       0
  • ローカル ファイル システムでは、このようなことは発生しません。
  • また、古い smbfs を搭載した古い SuSE ボックスでは、これらの問題は発生しません。

答え1

dirnameおよびに関連する処理を実行しようとしている cd コマンドのエイリアス設定が壊れていますsu。壊れたエイリアスを修正または削除してください。

関連情報