Page 1 of 1

Cups "500 internal server error" [Solved]

Posted: Fri 09 Aug 2013, 19:40
by greengeek
When I try to access any of the tabs within the Cups web interface I get a "500 Internal Server error"

Tips I have read on the forum suggest possible corruption (or permissions change) within a system file as a result of the addition of some recent package, however I don't think I have added anything recently so don't really know where to begin.

The general advice I found was to reinstall Puppy (I will have to do this by reverting to an older and somewhat undesirable savefile...) but before I do that I wondered if it might be possible to do either of the following:

1) Uninstall Cups, reinstall another version, then revert to original version if necessary.

2) Grab the Cups files from a 6-month old savefile (more fool me...I should backup more frequently) and replace all the current Cups stuff with those older files.

Does anyone think these may be valid possibilities?

I have Cups 1.4.6 running on Slacko 5.3

Re: Cups "500 internal server error"

Posted: Fri 09 Aug 2013, 20:33
by SFR
greengeek wrote:Tips I have read on the forum suggest possible corruption (or permissions change) within a system file as a result of the addition of some recent package, however I don't think I have added anything recently so don't really know where to begin.
Hey Greengek

I think this might be the cause indeed.
Could you check what are the permissions on some crucial directories like /usr, /usr/bin, etc.?
The output should be:

Code: Select all

# ls -ld /usr /usr/bin /usr/local/bin /usr/share /root
drwxr-xr-x 108 root root 1040 Aug  9 22:15 /root
drwxr-xr-x  70 root root  240 Jan  1  2008 /usr
drwxr-xr-x   4 root root  100 Aug  9 18:37 /usr/bin
drwxr-xr-x   2 root root   80 Aug  9 21:55 /usr/local/bin
drwxr-xr-x 237 root root  360 Jan  1  2008 /usr/share
# 
If you'll get something else, like:
drwxrwx---
so this is probably the cause and the fix would be:

Code: Select all

chmod 755 /root /usr /usr/bin /usr/local/bin /usr/share
Greetings!

Posted: Fri 09 Aug 2013, 22:46
by greengeek
Thanks SFR - you are a complete genius of epic proportions. That has done the trick and now I have my cups back to normal functionality.
Many thanks!!!!
(backing up my savefile any minute now... :-) )

Posted: Fri 09 Aug 2013, 23:19
by SFR
You're welcome! :)

Nah, not a genius (I'm working on it though :wink: ), I just had similar problem - not with CUPS, but with running browser as 'spot' and with 'pplog' - a couple of times before, even recently.
And since I was able to recreate it also with CUPS, the case was pretty obvious.

BTW, although the fix did the trick, it would be best to check also other crucial dirs, just in case...

Have a nice day &
Greetings!

Posted: Sat 10 Aug 2013, 05:36
by watchdog
In slacko 5.3.3 I found that installing the language pack corrupts cups. So I removed it by PPM and cups in now working. So now I am wondering if installing the language pack may change the permissions of dirs...

Posted: Sat 10 Aug 2013, 12:24
by mikeb
In slacko 5.3.3 I found that installing the language pack corrupts cups. So I removed it by PPM and cups in now working. So now I am wondering if installing the language pack may change the permissions of dirs...
In every instance of this happening its been caused by an sfs or added software. Cups needs certain files to have 'lp' ownership so anything that interferes with that will upset it. The added software and everything else might be fine since most things puppy live in root land.

mike

Posted: Sat 10 Aug 2013, 18:46
by greengeek
Thank you all for replying.
I have now confirmed that the problem is indeed caused by a recent installation. I recently started using the Multipup utility from smokey01, CatDude and Puppyluvr and this works great for making an iso that offers a choice of multiple pups to boot from (on one CD for example...) but it definitely causes a problem for Cups on my machine.

I have PMed smokey to ask if he is able to pinpoint where in Multipup the permissions get changed so hopefully he will be able to track it down.

Posted: Sat 10 Aug 2013, 23:41
by smokey01
I have PMed smokey to ask if he is able to pinpoint where in Multipup the permissions get changed so hopefully he will be able to track it down.
I have located the problem, fixed it and re-uploaded the Multipup-5.1 pet.

Posted: Sun 11 Aug 2013, 10:29
by greengeek
After doing the chmod as shown above - Cups appeared to be working correctly but I still could not print normally, so smokey suggested I should also add /var to the list of directories to use the chmod 755 command on.

After I did that I was able to do a "print selftest page" from the maintenance menu, but strangely not a "print test page" (they seem to do different things). I still could not print from geany at that stage so I also found it necessary to delete my printer and add it back in again.

After that it all seems to be going correctly.

Thanks for the help everybody.

Posted: Sun 11 Aug 2013, 11:29
by mikeb
After I did that I was able to do a "print selftest page" from the maintenance menu, but strangely not a "print test page" (they seem to do different things). I still could not print from geany at that stage so I also found it necessary to delete my printer and add it back in again.
print selftest page uses the printers own self test if available. print test page is a postscript test page that works on any printer.
If a printer is not set as default lpr printing may not work... eg test page/geany/command line so that may be why re-adding the printer worked

mike

Posted: Sun 11 Aug 2013, 11:46
by smokey01
Greengeek, sorry, I should have mentioned the delete and install the printer again. I had to do the same.

Cheers

Posted: Tue 21 Feb 2017, 21:50
by Galbi
Old thread but I report what worked for me after a long search...

Using PupJibaroWheezy I've got the Internal Server Error. Without the 500 (different

Code: Select all

chmod 755 /dev/random
chmod 755 /dev/urandom
Thanks.

Saludos.