Operating System - HP-UX
1834639 Members
2560 Online
110069 Solutions
New Discussion

Setting Permissions on System files.

 
SOLVED
Go to solution
Darrell Tschakert
Regular Advisor

Setting Permissions on System files.

Hi,
I am looking for the most convenient place to get permissins/ownerships for HP-UX files. For example /bin/more, /etc/services, /.rhosts, etc. Is there one place to go on the system - one file to look in?

Thanks,

Darrell T
I'll add a quote when I think of one.
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: Setting Permissions on System files.

Darrell,

Not that I know of. If you want to list the files you're interested in, I'd be happy to post them for you.

$ ll /bin/more /etc/services /root/.rhosts
-r-xr-xr-x 2 bin bin 73728 Jul 16 2002 /bin/more
-r--r--r-- 1 bin bin 11129 Sep 29 08:26 /etc/services
-r--r--r-- 1 root sys 151 Mar 16 2004 /root/.rhosts


Pete

Pete
Simon Hargrave
Honored Contributor
Solution

Re: Setting Permissions on System files.

Easiest way to check whether the files permissions are "correct" or not is to use swverify. It'll check all files against the package definition, including permissions. eg

swverify OS-Core.UX-CORE

This will check your core files.

If there's a specific file you want to check, you can see which package it exists in with something like (eg to : -

swlist -l file | grep /etc/services

tells you it's in package InternetSrvcs.INETSVCS-INETD

so then you can swverify this to check this file, and all other files in the package.


Sy
Sridhar Bhaskarla
Honored Contributor

Re: Setting Permissions on System files.

Hi Darrell,

The files under /usr/newconfig are supposed to have default permissions and ownerships. They are the default configuration files. In case if the configuration files are corrupted and are not retrievable from backups, then you can copy these files to get the OS going.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Robert-Jan Goossens
Honored Contributor

Re: Setting Permissions on System files.

Hi Darrell,

Yu can use swlist to print the default permissions for hpux files and directories

# swlist -l file -a mode | more

Hope this helps,
Robert-Jan
Darrell Tschakert
Regular Advisor

Re: Setting Permissions on System files.

Thank you all. The information will come in very handy in the future. I have tucked it away in my file of "Misc and Helpful Hints".

Thanks again,

Darrell Tschakert
I'll add a quote when I think of one.