Project

General

Profile

Bug #3213

hammer2: "ls" shows non-existent file

Added by peeter over 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
11/01/2019
Due date:
% Done:

100%

Estimated time:

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

--

History

#1

Updated by peeter over 1 year ago

fsck_hammer2 did not give any errors.

Peeter

--

#2

Updated by daftaupe 10 months 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/
total 28
-rw------- 1 root cups 129 16-May-2020 12:17 classes.conf
-rw-r--r-- 1 root wheel 29375 30-May-2020 16:25 cups-browsed.conf
-rw-r----- 1 root cups 2965 05-Apr-2020 14:07 cups-files.conf
-rw-r----- 1 root cups 2965 05-Apr-2020 14:07 cups-files.conf.sample
-rw-r----- 1 root cups 6278 05-Apr-2020 14:07 cupsd.conf
-rw-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 ppd
-rw------- 1 root cups 748 23-Jun-2020 14:28 printers.conf
-rw------- 1 root cups 786 23-Jun-2020 14:27 printers.conf.O
-rw-r----- 1 root cups 142 05-Apr-2020 14:07 snmp.conf
-rw-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 ?

#3

Updated by peeter 10 months 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.

Also available in: Atom PDF