[comp.sys.sgi] Print permissions IRIX 3.3.1

FL17@DLRVMBS.BITNET (12/13/90)

To: info-iris@brl.mil		11-Dec-1990

Print permissions on IRIX 3.3.1

In the default set-up of IRIX files to get printed must be readable by
group "lp" or by "world". A chmod to allow lp to access a file for printing
and another chmod after printing to reset the priviledges is not very
convenient. Does anyone have an idea for a better solution ?

Thanks and best regards

	R. Beyer

---------------------------------------------------------------------
Ralf Beyer	| German Aerospace Research Establishment
		| Braunschweig Research Center
		| Institute for Flight Guidance
		| Flughafen
		| D-3300 Braunschweig, Fed. Rep. of Germany
		| Phone: (0531) 395-2530
		| Email: 	 fl17@dlrvmbs.bitnet
		| Email (local): beyer@bflsgu
---------------------------------------------------------------------

eddc@opus.lerc.nasa.gov (Dave Carek) (12/20/90)

In article <9012110418.aa06749@VGR.BRL.MIL> FL17@DLRVMBS.BITNET writes:
>To: info-iris@brl.mil		11-Dec-1990
>
>Print permissions on IRIX 3.3.1
>
>In the default set-up of IRIX files to get printed must be readable by
>group "lp" or by "world". A chmod to allow lp to access a file for printing
>and another chmod after printing to reset the priviledges is not very
>convenient. Does anyone have an idea for a better solution ?
>
>Thanks and best regards
>
>	R. Beyer
>

If your having the problem of lp not being able to access your files because
of no read permission for world, and you don't wan't to make the switch to lpr,
then here is a short script that may help you out.

Save the following into a file called tlp in a directory to which you have 
a path ( /usr/local/bin/tlp is a good place for it if you have root access)
Make sure the file is executable
        eg.
        chmod 555 /usr/local/bin/tlp

-----cut here------
# !/bin/csh
set last = `echo $#argv`
set file = $argv[$last] 
@ x = `echo $#argv` - 1
set options = `echo $argv | cut -d" " -f1-$x` 
if ($last == '1' ) then
	set options =""
endif
cat $file | lp $options
------cut here-----

Try printing a file with 600 privileges using this.  It should pass options
to lp and print a file with no world permissions. 

Format 

tlp -options file


Where options are any options you would normally supply to lp (can be multiple)
and file is the filename to be printed. 

One drawback is that only one file can be printed at a time.
--
-----------------------------------------------------------------------
| David Carek                   |   phone: 216-433-8396               |
| NASA Lewis Research Center    |                                     |
| Cleveland, Ohio  44135        |   email: eddc@opus.lerc.nasa.gov    |
|---------------------------------------------------------------------|
| Engineer -> An innovative imaginative scientist who must design the |
|       improbable using the impossible on a budget that is invisible |
-----------------------------------------------------------------------