Operating System - HP-UX
1753479 Members
5043 Online
108794 Solutions
New Discussion юеВ

Re: how to include controlM agent startup at /etc/inittab file

 
SOLVED
Go to solution
Sharma Sanjeev
Respected Contributor

Re: how to include controlM agent startup at /etc/inittab file

Hi

As Berd Suggested use same,we are also using the same in our setup.

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
sysad_boy
Frequent Advisor

Re: how to include controlM agent startup at /etc/inittab file

OK got it now.

I added my startup script at /sbin/rc3.d and my shutdown script at /sbin/rc0.d.

Problem is I cant change the permission of my shutdown script in /sbin/rc0.d

My default umask is
root:/sbin/rc0.d> umask -S
u=rwx,g=rx,o=rx

my current file permission:
l---r-xr-x 1 root sys 50 Jul 16 18:28 K891ctm-agent-shut.sh -> /home/ctmagent/Agent/ctm/scripts/ctm-agent-shut.sh

I want to change it to "755," but chmod is not working on this one.



TIA!


Sunny123_1
Esteemed Contributor

Re: how to include controlM agent startup at /etc/inittab file

Hi

Firstly unlink it then change the permission to 755 and then again link it.

Regards
Sunny
sysad_boy
Frequent Advisor

Re: how to include controlM agent startup at /etc/inittab file

the permissions of the original file is already at 755.
Bill Hassell
Honored Contributor

Re: how to include controlM agent startup at /etc/inittab file

> my current file permission:
> l---r-xr-x 1 root sys 50 ...

> I want to change it to "755," but chmod is not working on this one.

You can't change the link's permissions. The permissions for the link are set based on the current value for umask at the time you created the link but have no effect on the target (/sbin/init.d). You can remove the link, change umask to 022 and then recreate it -- but it does not change the target. A symbolic link is just a pointer.


Bill Hassell, sysadmin
Sunny123_1
Esteemed Contributor

Re: how to include controlM agent startup at /etc/inittab file

Hi

Basically you cant change the permissions of link.

Regards
Sunny
Roopesh Francis_1
Trusted Contributor

Re: how to include controlM agent startup at /etc/inittab file

use chmod -h 775 for changing the link file permission
-h If the file is a symbolic link, change the mode of the link itself rather than the file that the link points to.
Dennis Handly
Acclaimed Contributor

Re: how to include controlM agent startup at /etc/inittab file

>frans2008: use chmod -h 775 for changing the link file permission

chown(2) has a -h option but I don't see it for chmod(2)??
Roopesh Francis_1
Trusted Contributor

Re: how to include controlM agent startup at /etc/inittab file

NAME
chmod -- change file modes or Access Control Lists


SYNOPSIS
chmod [-fv] [-R [-H | -L | -P]] mode file ...
chmod [-fv] [-R [-H | -L | -P]] [-a | +a | =a] ACE file ...
chmod [-fhv] [-R [-H | -L | -P]] [-E] file ...
chmod [-fhv] [-R [-H | -L | -P]] [-C] file ...
chmod [-fhv] [-R [-H | -L | -P]] [-N] file ...


DESCRIPTION
The chmod utility modifies the file mode bits of the listed files as
specified by the mode operand. It may also be used to modify the Access
Control Lists (ACLs) associated with the listed files.

The generic options are as follows:

-f Do not display a diagnostic message if chmod could not modify the
mode for file.

-H If the -R option is specified, symbolic links on the command line
are followed. (Symbolic links encountered in the tree traversal
are not followed by default.)

-h If the file is a symbolic link, change the mode of the link
itself rather than the file that the link points to.

-L If the -R option is specified, all symbolic links are followed.

OldSchool
Honored Contributor

Re: how to include controlM agent startup at /etc/inittab file

"-h If the file is a symbolic link, change the mode of the link
itself rather than the file that the link points to."

ok, I can find that for AIX, some AT&T style systems, but nothing like that on hpux 10.20, or any 11.xx variant.

so, what OS'es man page is that????