Using a wildcard/glob (at least *
and ?
) in bash
causes an input/output error
when there are no matches on a samaba cifs
mount in Debain Jessie 8.2. On other filesystems, the expected No such file
error is given.
The same samaba mount point on an archlinux box and has no io error. The Archlinux machine's mount.cifs
understands mapposix
. I suspect that mount.cifs
on jessie does not allow/understand mapposix
has something to do with this.
Is there away around io errors for *
?
## 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*
System info:
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)