Bug #3213
closedhammer2: "ls" shows non-existent file
100%
Description
Perhaps the more precise characterization is that "ls" shows a file that should exist, but accessing it by any other means gives the error "No such file or directory". The file in question is the backup conf file of cups, /usr/local/etc/cups/printers.conf.0
I am seeing it on hammer2 on three different machines.
Reproduce as follows:
1 - install cups (rc.conf: cupsd_enable=YES, sudo service cupsd start) and create a printer via the web interface at localhost:631 --> Administration --> Add printer
2 - delete and add the printer again: see if cups has created a backup copy of the config file which has the suffix .0,
/usr/local/etc/cups/printers.conf.0
If yes, then try "ls -l" and "ls -l /usr/local/etc/cups/printers.conf.0" and see that the second one should give an error "ls: /usr/local/etc/cups/printers.conf.0: No such file or directory".
Actually, I now see that any file with the suffix .0 that cups creates shows this weird feature. For instance, Administration --> Edit configuration file --> then save will create cupsd.conf.0, which gives error with "ls -l cupsd.conf.0" while "ls -l cupsd.conf" is fine.
Peeter
--
Updated by peeter about 5 years ago
fsck_hammer2 did not give any errors.
Peeter
--
Updated by daftaupe over 4 years ago
Hello peeter,
I'm trying to reproduce that as I'm having cups and a printer setup on my laptop.
Here is the dir content :
$ ls l /usr/local/etc/cups/ 1 root cups 129 16-May-2020 12:17 classes.conf
total 28
-rw------rw-r--r- 1 root wheel 29375 30-May-2020 16:25 cups-browsed.confrw-r---- 1 root cups 2965 05-Apr-2020 14:07 cups-files.confrw-r---- 1 root cups 2965 05-Apr-2020 14:07 cups-files.conf.samplerw-r---- 1 root cups 6278 05-Apr-2020 14:07 cupsd.confrw-r---- 1 root cups 6278 05-Apr-2020 14:07 cupsd.conf.sample
drwxr-xr-x 1 root cups 0 17-May-2020 09:43 ppdrw------ 1 root cups 748 23-Jun-2020 14:28 printers.confrw------ 1 root cups 786 23-Jun-2020 14:27 printers.conf.Orw-r---- 1 root cups 142 05-Apr-2020 14:07 snmp.confrw-r---- 1 root cups 142 05-Apr-2020 14:07 snmp.conf.sample
drwx------ 1 root cups 0 17-May-2019 18:25 ssl
I tried to copy / paste your line "/usr/local/etc/cups/printers.conf.0" (notice the last caracter is a zero), and I would get the same message
$ ls -l /usr/local/etc/cups/printers.conf.0
ls: /usr/local/etc/cups/printers.conf.0: No such file or directory
But then I copy/pasted the actual file (with the letter capital o at the end) and I didn't get the issue.
I've confirmed by editing the config file (I ended up with a file ending with the letter O, not the number 0).
Did you type or copy/paste the output of ls ?
Updated by peeter over 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Checked again, indeed, it's the confusion between '0' (zero) and 'O' (character 'O').
Thanks, closing this.