1833861 Members
1881 Online
110063 Solutions
New Discussion

Re: Link problem

 
Capes
Advisor

Link problem

I have to create
lrwxrwxrwt 1 root root 8 Feb 27 14:40 /bin -> /usr/bin
but the command:
#ln -sf /usr/bin /bin give me
lrwxr-xr-xt 1 root sys date bin@ -> /usr/bin

If you know how to do let me know
20 REPLIES 20
Juergen Tappe
Valued Contributor

Re: Link problem

The permissions depending on the umask.
I your case it was set to 022.

But for symbolic links they do not matter.
The permissions on them are not checked, the permissions of the destination (/usr/bin in your case get checked).

So:
Your Link is working fine.
If you realy care about the "ll" output you could rm and recreate it with "umask 000" before. Dont forget to set it back to 022 after, otherwise EVERY new file/dfir will be writeable to everybody.

I guess the time of the file you dont care about. But if so: Try a "touch -t
Working together
Capes
Advisor

Re: Link problem

thanks very much for your quick answer, but I made a mistake in the question.
I have in fact:
#ln -sf /usr/bin /bin give me
lrwxr-xr-x 1 root sys "date-time" bin@ -> /usr/bin
The link is created without the "t".
How to put this "t" and what is the meaning ?
Juergen Tappe
Valued Contributor

Re: Link problem

The "t" stands for "Transition Link".
They are excactly the same like normal links.
They were created during HP-UX 9 to 10 upgrade, because there a lots of file and directories in different locations between ux 9 and 10. The t helps to identify a Transition link.
You dont realy need to care about that.

But you could try to run "tlinstall" which checks all transition link within the whole system.

btw. The t bit on normal directories is called the "sticky bit" and means that only the owner of a file can remove even it and the directory is writeable i.e. for everybody.

Hope this helped.
Juergen
Working together
Capes
Advisor

Re: Link problem

My really problem is during the station reboot the interpreter "sh" is not find in "/bin/sh".
After creating the link:
#ln -sf /usr/bin /bin

I have the same problem

Any Idea ?

Capes
Advisor

Re: Link problem

May be it is a owner or group problem.
I have "root" and "sys"
is it correct ?
Juergen Tappe
Valued Contributor

Re: Link problem

If you are talking about shutdown/startup scripts in /sbin/init.d:

They should use interpreter /sbin/sh thats because i.e. /usr might not be mounted when they get executed.

Any /sbin/ commands are not using shared libraries as well which are normaly located under /usr too.

Did I unterstood you problem correctly?
Working together
Capes
Advisor

Re: Link problem

It is not the startup/shutdown scripts. Is is located when my application and HP-OV start.
And I have the message:
/bin/sh: not found.
That's why i try to re-created this link
regards
Juergen Tappe
Valued Contributor

Re: Link problem

Its not the owner/group Im sure.

How do start OV?
pls post the command and paramters.
If this is a shell script. pls post that as well.

Perhaps I can find s.th.
Working together
Capes
Advisor

Re: Link problem

I don't know enough the scripts to send you the exact on in cause.

Is it possible to re-create the exact link with "t" instead of "x" like the following:

lrwxrwxrwt 1 root root 8 Feb 27 14:40 /bin
-> /usr/bin
Juergen Tappe
Valued Contributor

Re: Link problem

This will not help you, belive me :)
The permissions of symbolic links are realy just cosmetical.

Lets try it that way:
1. lets check if /bin/sh can be found from your normal session and the Persiossion of´this file ARE important indeed:
ll /bin/sh
whats the output
It should be excutable for you.
(r-xr-xr-x)

2. you type in a command to start OV
which is it? I guess its ovstart.
Type in
which ovstart (or your command)
It should return with the complete PATH
name where ist is located.

Then do a "file .
I guess the result will be somthing with
shell

If so, I hope you are familar with the
editor "vi".
make a copy of the file , just to be sure to be sure.
edit the file and check in the very first
line (I guess it containes : #!/bin/sh )
for a trailing space character at the end.
remove it and try to run it again.

thats because I think to remeber a problem years ago, when a trailing space in a script created a similar problem.


Working together
Capes
Advisor

Re: Link problem

1 - # ll /bin/sh
/bin/sh not found

That's my problem. Even if the link exist between bin@ -> /usr/bin


Any idea ?
Juergen Tappe
Valued Contributor

Re: Link problem

And what is with "ll /usr/bin/sh" does it exist or not?

Try a "ll -d /usr/bin" as well pls.
Working together
Capes
Advisor

Re: Link problem

OSNMC2,sys,root #
OSNMC2,sys,root # ll /usr/bin/sh
-r-xr-xr-x 2 bin bin 221184 Apr 23 2001 /usr/bin/sh*
OSNMC2,sys,root #
OSNMC2,sys,root #
OSNMC2,sys,root #
OSNMC2,sys,root #
OSNMC2,sys,root #
OSNMC2,sys,root # ll -d /usr/bin
drwxrwxrwt 6 bin bin 10240 Apr 23 10:17 /usr/bin/
OSNMC2,sys,root #
OSNMC2,sys,root #
OSNMC2,sys,root #
Juergen Tappe
Valued Contributor

Re: Link problem

Very strange ....
OK Next try:
try to remove the link and recreate it.

# rm -i /bin (and a y after the question)
# newgrp root # to be sure you belong to this group
# umask 000 # standard permissions
# ln -s /usr/bin /bin
# ll /bin
# cd /bin # your can enter the directoy?)
# ll /bin/sh # again and again :)

This this all doesnt help. Do you have a backup, can you restore just this file from it?
Working together
Capes
Advisor

Re: Link problem

Sorry I went for lunch.

I doesn't help me, I have done all you ask me but still:
# ll /bin/sh
/bin/sh not found
#

I'm having a complete backup on DAT, but how to extract only the missing link ?

Juergen Tappe
Valued Contributor

Re: Link problem

Might be this helps.

I created a tar file containing "*only*" the /bin link from a UX 11.0 system. See attachment.

If your browser running under Windows
ftp from dos prompt the "bin" option to your unix system.

First check the content with:
tar tvf binlink.tar

If this is a success unpack it with:
tar xvf binlink.tar
------------------------------------------

If this istnt helping you -
how to restore it from your backup depends on how it got backed up.
which backup tool/system you are using?
Working together
Juergen Tappe
Valued Contributor

Re: Link problem

I am sooooo sorry.
Forget the attachment - tsstssstsss
here it it:
Working together
Capes
Advisor

Re: Link problem

Ok thanks very much I will try on Monday.

Regards
Juergen Tappe
Valued Contributor

Re: Link problem

Hi Capes,

I hope I helped you.
I few points would be appreciated...

regards
Juergen
Working together
Capes
Advisor

Re: Link problem

Unfortunatly not
I put backup and I will restart my upgrade
Anyway thanks for your help
Regards