Question: After coming from cygwin, I'm quite confused about the bash (version 4.1.5) globbing on my Ubuntu 10.4. I'd love one of the following two possibilities:

* ignore `.` and `..`, match everything else
* ignore filenames starting with a dot unless given explicitly

The current behavior is plain strange:

```
cd; ls .*

```

says "ls: cannot access .\*: No such file or directory" although I explicitly asked for filenames starting with a dot.

```
cd; ls .gnupg/*.gpg

```

complains as well although I'm asking for files not starting with a dot (it's just the directory name what starts with a dot).

### Output of `shopt -p`

(removed)

### The solution

I've changed `shopt` to values from another user (not having this problem) and it didn't help. Then I came to the idea to bisect my `.bashrc` and find the offending line which contained something like `GLOBIGNORE='.[!/.]*:..[!/]*:*/.[!/.]*:*/..[!/]*:`...

I've replaced it by `GLOBIGNORE='.:..'`, which does nearly what I want, and it works.

Answer: 
Unfortunately, I must answer my own question. It was `GLOBIGNORE`. From the man page:

*A colon-separated list of patterns defining the set of filenames to be ignored by pathname expansion. If a filename matched by a pathname expansion pattern also matches one of the patterns in GLOBIGNORE, it is removed from the list of matches.*
The "ls: cannot access .\*: No such file or directory" error sounds like there are permissions problems with the current directory. I can reproduce it with:

```
$ mkdir -p ~/tmp/tmp
$ cd ~/tmp/tmp
$ ls .*
.:

..:
tmp
$ chmod u-r .
$ ls .*
ls: cannot access .*: No such file or directory
$ ls -ldn .
d-wxr-xr-x 2 1000 1000 4096 2012-03-12 18:31 .
$ chmod u+r .
$ ls .*
.:

..:
tmp

```

I'd suggest running `chmod +r .` and trying the `ls .*` again.