tjfontaine / airprint-generate

Automatically generate AirPrint Avahi service files for CUPS printers
http://www.atxconsulting.com/blog/tjfontaine/2010/11/21/automatically-generate-airprint-avahi-service-files-cups-printers
400 stars 119 forks source link

SOLVED - avahi 64bit #7

Closed mose07 closed 11 years ago

mose07 commented 11 years ago

hello,

I'm using a 64bit RHEL6. bash works well but the launch of avahi-daemon 0.6.25 I have error in the log

open ("/ services / AirPrint-myprinter.service", O_RDONLY): Permission denied Failed to load service group file / services / AirPrint-myprinter.service, ignoring.

I copy / services / AirPrint-myprinter.service on RHEL5 32bit version of the file works well

a question, is there a version incompatibility between this script and the version of avahi?

thank you

Ps: the file " AirPrint-myprinter.service" permissions are 644

tjfontaine commented 11 years ago

no but whatever user avahi is running as doesn't have permission to read the file, try and chmod 644 AirPrint-myprinter.service and reload avahi and see if that helps, it could also be that avahi can't change into the directory where the file is saved because it doesn't have permission there

mose07 commented 11 years ago

hi , the file " AirPrint-myprinter.service" permissions are 644. -rw-r--r--. 1 root root 1069 19 oct. 19:30 AirPrint-myprinter.service

I think a bug, either avahi or script ...

mose07 commented 11 years ago

SOLVED juste disable SeLinux

bye !!!

HaTaX2 commented 11 years ago

Kind of drastic to completely disable SeLinux when the issue can be fixed with a very simple command. After you've copied the file to the /etc/avahi/services/ path run the following command on it:

"restorecon /etc/avahi/services/AirPrint-PRINTERNAMEHERE.service" where PRINTERNAMEHERE is whatever the name of the printer you created is.

After that just restart the avahi-daemon service and it should be working fine.