Operating System - HP-UX
1752471 Members
6921 Online
108788 Solutions
New Discussion юеВ

Re: Create a depot with non-root user

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

Re: Create a depot with non-root user

>Tried giving file_permissions -o bin -g bin
but it gives an error & requires the "-m" tag as well

I don't have any problems leaving out -m on 11.11, 11.23 or 11.31. You can also use "-u 222" as the documentation suggests.

>If I can somehow give "file_permissions -o bin -g bin", my problem is solved.

I have no problems doing that. What error do you get?
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Create a depot with non-root user

Here is snippet of psf:

fileset
directory Test=/opt/Test
file_permissions -o root -g sys
file *

Error:
WARNING: Invalid value defined for the keyword "file_permissions", at
line 23. Valid values for this keyword are:

[-m mode|-u umask ] [-o [owner[,]][uid]] [-g [group[,]][gid]]

where each component of the value defines a default permission
for files in the fileset.


If I add the "-m" tag in the file_permissions, it creates without any error.
My system is HPIA 11.31

Putting the "-u" tag also will disturb the base permissions of my file
Vibhor Kumar Agarwal
Dennis Handly
Acclaimed Contributor
Solution

Re: Create a depot with non-root user

>My system is HPIA 11.31

Do you have any SD patches? I don't get that error. I'll check mine.

>[-m mode|-u umask ] [-o [owner[,]][uid]] [-g [group[,]][gid]]

As I mentioned above, simply use "-u 222" instead of -m.
Dennis Handly
Acclaimed Contributor

Re: Create a depot with non-root user

My version is: SW-DIST B.11.31.0803.317
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Create a depot with non-root user

Give me a couple of days.
I'll get back on Monday.
Vibhor Kumar Agarwal
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Create a depot with non-root user

Thanks

Putting "-u 000" solved my purpose.
Giving "-u 222" was subtracting the permissions.
Vibhor Kumar Agarwal
Dennis Handly
Acclaimed Contributor

Re: Create a depot with non-root user

>Giving "-u 222" was subtracting the permissions.

Yes. You wanted files with write permission?
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Create a depot with non-root user

I want the permissions as it is as they are present in the directory from which I am building the package.
Vibhor Kumar Agarwal
Dennis Handly
Acclaimed Contributor

Re: Create a depot with non-root user

>I want the permissions as it is as they are present in the directory

I was questioning why you would ever deliver a file that was writable?
These files, unless marked volatile and are in /etc or /var, should be treated as read only. And you may have swverify issues, if changed.
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Create a depot with non-root user

A couple of files are script files which have to be run after the package has installed.
These scripts start the services.

Is there any other option rather than sending them as writable?

Could you give me some information about the volatile files, i am unaware of this.
Vibhor Kumar Agarwal