![SMBFS/CIFS - 공백이 있는 경로로 이동할 수 없습니다.](https://rvso.com/image/1035915/SMBFS%2FCIFS%20-%20%EA%B3%B5%EB%B0%B1%EC%9D%B4%20%EC%9E%88%EB%8A%94%20%EA%B2%BD%EB%A1%9C%EB%A1%9C%20%EC%9D%B4%EB%8F%99%ED%95%A0%20%EC%88%98%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
Ubuntu Server 10.04 LTS를 사용하여 최근 apt-get을 통해 최신 Samba 및 smbfs로 업그레이드했으며 SMB를 통해 Windows 공유를 마운트하면 다음과 같은 오류가 발생합니다.
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
. 손상된 별칭을 수정하거나 제거합니다.