Print permissions IRIX 3.3.1
Dave Carek
eddc at opus.lerc.nasa.gov
Thu Dec 20 09:00:36 AEST 1990
In article <9012110418.aa06749 at VGR.BRL.MIL> FL17 at DLRVMBS.BITNET writes:
>To: info-iris at 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 at opus.lerc.nasa.gov |
|---------------------------------------------------------------------|
| Engineer -> An innovative imaginative scientist who must design the |
| improbable using the impossible on a budget that is invisible |
-----------------------------------------------------------------------
More information about the Comp.sys.sgi
mailing list