- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: lp can't open file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2003 03:00 PM
04-10-2003 03:00 PM
#uname -a
HPUX 10.20
#cd /etc
#lp hosts
#can't open hosts
#lp /etc/hosts
print OK
#which lp
/usr/bin/lp
#more hosts
display hosts OK
Any idea is appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2003 03:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2003 03:12 PM
04-10-2003 03:12 PM
Re: lp can't open file
world-readable
-rw-r--r--
And the user issuing these commands has what permissions?
root
Notice #
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2003 03:43 PM
04-10-2003 03:43 PM
Re: lp can't open file
Don't give up George, we'll get it.
Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2003 04:11 PM
04-10-2003 04:11 PM
Re: lp can't open file
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 07:54 AM
04-11-2003 07:54 AM
Re: lp can't open file
Can you more and vi any other file when logging remotely?
After issue of the lp command, is the print in the print queue?
We'll get this!
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 07:59 AM
04-11-2003 07:59 AM
Re: lp can't open file
cd /etc
lp ./hosts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 08:44 AM
04-11-2003 08:44 AM
Re: lp can't open file
doesn't work either. Same error message
cannot open file hosts
However, I still can more or cat or vi hosts
by
more hosts
The permission of hosts is
rw-r--r--
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 08:54 AM
04-11-2003 08:54 AM
Re: lp can't open file
Here it is on one of my 10.20 boxes:
root> uname -a
HP-UX chop B.10.20 A 9000/715 2001081504 two-user license
chop:[ /etc ]
root> ll /usr/bin/lp
-r-sr-xr-x 1 root bin 45056 Nov 2 2001 /usr/bin/lp
chop:[ /etc ]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 08:56 AM
04-11-2003 08:56 AM
Re: lp can't open file
/usr/bin/lp:
$Revision: 78.29.1.96 $
PATCH_10_20: hpux_rel.o lp.o 01/11/02
Forgot to "what" it for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 09:09 AM
04-11-2003 09:09 AM
Re: lp can't open file
/usr/bin/lp:
$Revision: 78.29.1.89 $
PATCH_10_20: hpux_rel.o lp.o 01/08/08
# ls -l /usr/bin/lp
-r-sr-xr-x 1 root bin 45099 Aug 8 2001 /usr/bin/lp
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 09:38 AM
04-11-2003 09:38 AM
Re: lp can't open file
What is your permissions on /etc? What does 'ls -ld /etc' return?
Also, what does 'echo $CDPATH' return?
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 09:43 AM
04-11-2003 09:43 AM
Re: lp can't open file
dr-xr-xr-x 25 bin bin 6144 Apr 11 11:51 /etc
# echo $CDPATH
CDPATH: Undefined variable.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 10:13 AM
04-11-2003 10:13 AM
Re: lp can't open file
I'm stumped. Has this problem just happened recently? If so, what has changed on the box lately? Patches? Any config files modified such as root's .profile, etc.?
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 10:19 AM
04-11-2003 10:19 AM
Re: lp can't open file
BTW, Does lp use $CDPATH to search the file or some other methods?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 10:29 AM
04-11-2003 10:29 AM
Re: lp can't open file
The CDPATH is used for searching paths for the cd command to change directories. It was a wild guess.
Do you have a default destination set for your lp printing? Also, does lp have the same problem with other files in /etc or does it print them? For example, can you do:
cd /etc
lp services
or does that complain also?
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 10:35 AM
04-11-2003 10:35 AM
Re: lp can't open file
lp filename
or
lp ./filename
but it works for syntax like
lp /directory/filename
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 10:45 AM
04-11-2003 10:45 AM
Re: lp can't open file
Also, do you have a default printer destination set for your lp spooler, or is it undefined?
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 11:33 AM
04-11-2003 11:33 AM
Re: lp can't open file
It also (as lp) tried to link the file to /var/spool/lp/request/
If you have it installed, it would be helpful to see a trace output from running "lp host". If you don't have it, you can d/l it from
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/trace-1.6/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 11:50 AM
04-11-2003 11:50 AM
Re: lp can't open file
All accounts except lp can't open a directly file in all directories.
If I
su - lp
then
lp filename
works just fine.
Maybe need to patch now.
I'm installing a tracing tool to try. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 12:06 PM
04-11-2003 12:06 PM
Re: lp can't open file
/sbin/init.d/lp stop
/sbin/init.d/lp start
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 11:39 PM
04-11-2003 11:39 PM
Re: lp can't open file
tried on my 10.20, and here is what i get:
============================================================
K250: home/yd>lp /etc/hosts
lp: no system default destination
K250: home/yd>lp -dit1 /etc/hosts
request id is it1-2963 (1 file)
K250: home/yd>what /usr/bin/lp
/usr/bin/lp:
$Revision: 78.29.1.55 $
PATCH_10_20: hpux_rel.o lp.o 99/06/09
K250: home/yd>ls -l /usr/bin/lp
-r-sr-xr-x 1 root bin 45056 Jun 9 1999 /usr/bin/lp
K250: home/yd>uname -r
B.10.20
============================================================
[works fine]
Most probably a patch issue. Did it work previously?
if not, maybe a little trace would help....
Best regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2003 07:08 AM
04-13-2003 07:08 AM
Re: lp can't open file
I've thought of a couple of more things to try. Do you have your lpsched daemon started with the -v option? If not, you could stop it and restart it with -v so that it will log requests to /var/adm/lp/log. That might help give a clue about what is happening.
The more I think about it, the more it seems like a permissions problem somewhere, since lp can open files with the full pathname but not just the filename. Here's a couple more things to check. What does 'ls -ld /' return, and what does return? Also, what does the entry for lp look like in your /etc/passwd file?
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2003 05:01 AM
04-14-2003 05:01 AM
Re: lp can't open file
I thought most of the possibilities and now I think patches in somewhere might cause the problem.
When I ran trace, I got the following logs ONLY, which may imply deeper problem somewhere.
chinook(root):/ 1# /opt/trace/bin/trace lp -dlab11 backuplogs
lp: can't open file backuplogs
KI_TRACE_GET: Bad address
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2003 07:44 AM
04-28-2003 07:44 AM
Re: lp can't open file
lpadmin -d{your default printer here}
Gary