When we executed a lpadmin command, the following error was output.
# lpadmin -phsaprinter -v/home/hoge/lpfile -mrmodel -ocmrcmodel
-osmrsmodel -ormhsaprinter -orphsaprinter
lpadmin: can't access file "/home/hoge/lpfile"
/home/hoge/lpfile is the file other user made.
The permission of this file is 664.
# ll /home/hoge/lpfile
-rw-rw-r-- 1 root sys 13 Aug 9 10:22
/home/hoge/lpfile
The owner group is "sys".
but group "sys" has as a secondary group "lp".
# cat /etc/group
:
sys::3:root,uucp,lp?<< add a lp user
:
In this settings, I think that it can write to /home/hoge/lpfile.
However, the error was output.
Problem Analysis:
I changed the permission of the file from 664 to 666.
and the error is not output.
# chmod 666 lpfile
# ll /home/hoge/lpfile
-rw-rw-rw- 1 root sys 13 Aug 9 10:22
/home/hoge/lpfile
# lpadmin -phsaprinter -v/home/hoge/lpfile -mrmodel -ocmrcmodel
-osmrsmodel -ormhsaprinter -orphsaprinter
# <<< Error is not output.
When I changed the owner(or group) of the file to lp, the error is
not output, too.
I found the man page of lpadmin(1M).
It have the following.
# man lpadmin
:
-vdevice Associates a new device with printer P.
device
is the pathname of a file that is
writable by
the LP administrator lp. Note that
there is
nothing to stop an administrator from
associating the same device with more
than one
printer. [...]
I think that I should be able to execute the command lpadmin(1M)
without becoming an error even in the state of permission 664 if
there is lp user in the owner group of the file.
I checked this test by 11.31, and this error was output.
</quote from 4000215408>
<quote>
Customer Company: HITACHI
Customer Handle: HITACHI-SOFT
Customer Contact: +81-45-862-8422
Customer Email:
csite_9v@soft.hitachi.co.jp
Severity: Serious
Urgency: High: Problem reported by major ISV
Desired Solution Types: Generally Available Solution (GR patch needed)
Found in Versions: (11.23 11.31)
</quote>