io error on no-match glob in cifs OSX -> debian jessie mount

Использование подстановочного знака / glob (как минимум * и ? ) в bash вызывает ошибка ввода / вывода при отсутствии совпадений на монтировке самаба cifs в Debain Jessie 8.2. В других файловых системах выдается ожидаемая ошибка Нет такого файла .

Та же самая точка монтирования samaba на компьютере с Archlinux и без ошибки io. Крепление машины Archlinux . cifs понимает mapposix . Я подозреваю, что mount.cifs на jessie не разрешает / не понимает mapposix имеет какое-то отношение к этому.

Есть ли ошибки io для * ?


 ## works as expected on cifs mount from centos server
 ls /data/Luna1/*adfadf*
 # ls: cannot access /data/Luna1/*adfadf*: No such file or director


 ### unexpected io failure on osx mounted on debian
 mkdir /Volumes/Phillips/testdir

 ## no files match in empty directory: io error
 ls /Volumes/Phillips/testdir/*
 #  ls: reading directory /Volumes/Phillips/testdir/*: Input/output error

 ## glob matches, ls results
 touch /Volumes/Phillips/testdir/file
 ls /Volumes/Phillips/testdir/*
 #  /Volumes/Phillips/testdir/file

 ## glob matches, ls results
 ls /Volumes/Phillips/testdir/*il*
 # /Volumes/Phillips/testdir/file

 ## no files match: io error
 ls /Volumes/Phillips/testdir/*foobar*
 #  ls: reading directory /Volumes/Phillips/testdir/*foobar*: Input/output error

 # fails as expected
 ls /*filedoesnotexist*
 #  ls: cannot access /*filedoesnotexist*: No such file or directory

 ## zsh handles this correctly
 zsh -c "ls /Volumes/Phillips/*dne*"
 #  zsh:1: no matches found: /Volumes/Phillips/*dne*

Информация о системе:

cat /etc/debian_version 
   8.2  
dpkg -l cifs-utils 
   ii  cifs-utils     2:6.4-1      amd64        Common Internet File 


mount |grep cifs
//gromit/Luna1/ on /data/Luna1 type cifs (rw,relatime,vers=1.0,cache=strict,username=foranw,domain=GROMIT,uid=1000,forceuid,gid=1000,forcegid,addr=10.145.64.52,unix,posixpaths,serverino,nobrl,acl,rsize=61440,wsize=65536,actimeo=1)

//skynet/Phillips/ on /Volumes/Phillips type cifs (rw,nosuid,nodev,noexec,relatime,vers=1.0,cache=strict,username=lncd,domain=SKYNET,uid=1000,forceuid,gid=1000,forcegid,addr=10.145.64.109,file_mode=0755,dir_mode=0755,nounix,nobrl,rsize=61440,wsize=65536,actimeo=1)
1
задан 3 December 2015 в 19:58
1 ответ

Мое текущее решение - прикоснуться к файлу, который сопоставляет глобус, чтобы избежать ошибки

Это особенно хорошо работает для FSL bet , где rm вызывается с глобусом, который ничего не соответствует. Интересно, что вместо ошибки ввода-вывода он выдает «каталог существует» (когда его нет).

bet 002_mprage_hpf 002_mprage_hpf_brain -m -f 0.1
# /bin/rm: cannot remove '002_mprage_hpf_brain_tmp*': Is a directory.
[ $? -ne 0 ] && echo failed
# failed

vs

touch 002_mprage_hpf_brain_tmp_hackyhackhack
bet 002_mprage_hpf 002_mprage_hpf_brain -m -f 0.1
[ $? -ne 0 ] && echo failed
# $? == 0
0
ответ дан 4 December 2019 в 06:49

Теги

Похожие вопросы