- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Create a depot with non-root user
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
Discussions
Discussions
Discussions
Forums
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
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
тАО06-07-2009 10:09 PM
тАО06-07-2009 10:09 PM
I am creating a depot with non-root user.
Giving the "run_as_superuser=false" with swpackage command starts the process successfully.
I want the files to have the permissions of the user with which the swpackage command is being run but the files should get deployed as permissions of root. This is what is troubling me.
If the permissions are of the calling user, it gets deployed with the same permissions.
The "file_permissions -o bin -g bin -m 555" tag doesn't take only "owner" & "group", it requires "mode" as well. This gives the same permissions to all files.
How can i create the depot with a non-root user will file permissions on getting deployed as root (having calling user permissions in the package creation directory)?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2009 11:20 PM
тАО06-07-2009 11:20 PM
Re: Create a depot with non-root user
If a normal user is able to create a depot whit root files, and can install it the user can get root privilages (and if that works there is a security leak in swinstall....)
how to implement sudo Just reares for sudo ore sudoers on the forum...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2009 12:43 AM
тАО06-08-2009 12:43 AM
Re: Create a depot with non-root user
User can create packages with a non-root user, but the installation requires him to be root.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2009 12:30 PM
тАО06-08-2009 12:30 PM
Re: Create a depot with non-root user
Take a look at the swacl(1m) man page. It allows fine-grained control over SD-UX operations. The catch is well stated in that page:
Some operations allowed by ACLs are run as local superuser. Because files are loaded and scripts are run as superuser, granting a user write permission on a root filesystem or insert permission on a host effectively gives that user superuser privileges.
So you *can* allow users installation priviledges, but anyone that can install software should be considered to have full root access.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2009 11:58 PM
тАО06-08-2009 11:58 PM
Re: Create a depot with non-root user
I only want to create the depot with non-root user.
Please go through my first post, the problem is putting the right permissions in the depot files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2009 02:48 PM
тАО06-09-2009 02:48 PM
Re: Create a depot with non-root user
To allow user allen to create, register, and manage all new depots and roots on the local system:
swacl -l host -M user:allen:a
swacl -l global_soc_template -M user:allen:a
swacl -l global_product_template -M user:allen:a
To allow user allen to fully manage my_depot, which already exists:
swacl -l depot -M user:allen:a @ /my_depot
swacl -l product_template -M user:allen:a @ /my_depot
swacl -l product -M user:allen:a \* @ /my_depot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2009 12:54 AM
тАО06-10-2009 12:54 AM
Re: Create a depot with non-root user
Here is what i want:
Have a couple of files named a & b with permissions of user x. I want them to get deployed when root installs the depot as "root".
file_permissions attribute is not helping me because it can't take the owner & group argument alone, it require mode as well. My files have different modes and don't want to specify that tag for every file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2009 06:57 AM
тАО06-10-2009 06:57 AM
Re: Create a depot with non-root user
You can leave out the -m mode and use the file specification for your few root files.
All other files should have the proper modes (and owners if possible) before you use swpackage.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2009 08:08 AM
тАО06-10-2009 08:08 AM
Re: Create a depot with non-root user
In the PSF you can specify attributes on a per file/directory basis. For example:
file -m 0555 -o bin -g bin /tmp /opt/swa
If you post your PSF (or an abstract) we could propose specific changes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2009 09:31 PM
тАО06-10-2009 09:31 PM
Re: Create a depot with non-root user
That's what exactly what i want and is not happening.
Sample psf file (of the fileset tag):
directory Test=/opt/Test
file *
Tried giving
file_permissions -o bin -g bin
but it gives an error & requires the "-m" tag as well, like below (but this disturbs my file permissions)
file_permissions -o bin -g bin -m 555
If i can somehow give "file_permissions -o bin -g bin", my problem is solved.
Options ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2009 11:03 PM
тАО06-10-2009 11:03 PM
Re: Create a depot with non-root user
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2009 01:13 AM
тАО06-11-2009 01:13 AM
Re: Create a depot with non-root user
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2009 04:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2009 09:47 PM
тАО06-11-2009 09:47 PM
Re: Create a depot with non-root user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2009 01:11 AM
тАО06-12-2009 01:11 AM
Re: Create a depot with non-root user
I'll get back on Monday.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 04:32 AM
тАО06-15-2009 04:32 AM
Re: Create a depot with non-root user
Putting "-u 000" solved my purpose.
Giving "-u 222" was subtracting the permissions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 07:48 AM
тАО06-15-2009 07:48 AM
Re: Create a depot with non-root user
Yes. You wanted files with write permission?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 10:01 PM
тАО06-15-2009 10:01 PM
Re: Create a depot with non-root user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 10:25 PM
тАО06-15-2009 10:25 PM
Re: Create a depot with non-root user
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 10:34 PM
тАО06-15-2009 10:34 PM
Re: Create a depot with non-root user
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 10:46 PM
тАО06-15-2009 10:46 PM
Re: Create a depot with non-root user
Scripts have to be executable, not writable. And if they have to be run after, they should be configure control scripts.
>Is there any other option rather than sending them as writable?
Sending what as writable?
>Could you give me some information about the volatile files
You add -v to file attribute describing the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 10:59 PM
тАО06-15-2009 10:59 PM
Re: Create a depot with non-root user
I meant executable.
There are some files which have only read permission to root (r--,---,---) and many variants.
In such a case i will have to give different "-u" for each group of files.
Hence, i choose the "-u 000" option.
Is there any drawback in it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 11:21 PM
тАО06-15-2009 11:21 PM
Re: Create a depot with non-root user
>In such a case I will have to give different "-u" for each group of files. Hence, I choose the "-u 000" option.
No need to use -u 000, you can use -u 222 to make sure all files are read only. It only removes any "w" permissions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 11:44 PM
тАО06-15-2009 11:44 PM
Re: Create a depot with non-root user
Thanks