This problem is a result of disabling the cups web interface via "cupsctl WebInterface=no" as suggested in bug #864522, comment #3. I'm filling a separate bug as I'm not sure whether it's bug or designed so. Steps to reproduce: 1) cupsctl WebInterface=no 2) systemctl restart cups.service 3) a) Python import cups; file ("cupsd.copy", "w"); cups.Connection().getFile("/admin/conf/cupsd.conf", "cupsd.conf")' b) C FILE * file = fopen (filename, "w"); http_t *http = httpConnectEncrypt (cupsServer(), ippPort(), cupsEncryption()); cupsGetFile (http, "/admin/conf/cupsd.conf", "cupsd.conf"); fclose (file); Actual results: cupsGetFile [1] fetches the "Web Interface is Disabled" html page instead of the requested file. [1] http://www.cups.org/documentation.php/api-httpipp.html#cupsGetFile This makes cupsd.conf editing in for example system-config-printer impossible, one will end up with the "Web Interface is Disabled" html page instead of original cupsd.conf after making some server setting with s-c-printer.
(In reply to comment #0) > a) Python > import cups; > file ("cupsd.copy", "w"); s/cupsd.copy/cupsd.conf
(In reply to comment #0) > I'm filling a separate bug as I'm not sure whether it's bug or designed so. cupsGetFile is a HTTP GET request so there's probably not much we can fix here. I just didn't want to pollute bug #864522 until we are sure.
Oh, *that's* how I ended up with that message in cupsd.conf that time. Yes, I think that's intentional behaviour, and I hadn't thought about the fact that server setting adjustment is done over HTTP not IPP. Looks like we'll have to add the web interface back in then.
Separately: I wonder if 'cupsctl' is careful to avoid that problem or not?
cupsctl uses cupsAdminGetServerSettings and cupsAdminSetServerSettings which were added in cups-1.3 and cupsctl doesn't seem to have problems with WebInterface=no. Doesn't it sound like something we want to have bindings for in pycups ?
http://www.cups.org/documentation.php/doc-1.4/api-cups.html#cupsAdminGetServerSettings
Hmm, we *do* have such bindings, and in fact that's what system-config-printer uses. I wonder how come they work fine whereas our tool doesn't.
Seems that it's used only for getting of basic server settings (_fillBasic()), the advanced server settings (_fillAdvanced()) use getFile().
Try this as a non-root user: cupsctl -U root WebInterface=Yes ... it fails in the same way. When it is run as root it just reads the file directly!
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Not clear there's anything we can do to fix this.