Hello, I've been trying to write a cgi script that will clear and restart
the printers on our server.  We have 3 printers that just give me fits
running through a Linux server.  I have no problem getting everything back
up and running on the command line but when I go on vacation the office
staff wont leave me alone and I have to log into the server from where
ever I'm at and clear them.  The steps that I've been trying to take are
to move the print jobs to another directory on the server, then restart
lpd.  I'm using the file copy module but when it gets to this line it
fails with the following error message in the log:

Insecure dependency in rename while running setuid at
/usr/lib/perl5/5.00503/File/Copy.pm line 156.

The line in the script that causes this is:
move("/var/spool/lpd/$printer/[cd]f*", "$printer");

The permissions on the script are:
-rwsr-xr-x   1 root     root         1312 Jun 26 08:21 clearpq.cgi

I know it's probably not good to run a cgi script with suid root but I
think that would be better then giving the Secretarys root access to the
server and having them delete files.  The server is not connected to the
Internet but is an internal machine.

Any help on solving this problem would sure make my upcoming vacation much
nicer ;^)

--
Rob

Do not meddle in the affairs of wizards,
for they are subtle and quick to anger.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to