Install Access Denied

Moderator: pandel

djm79
Beiträge: 65
Registriert: 04 Feb 2013, 14:03

Install Access Denied

Beitrag von djm79 »

I love this as it really makes non linux admins building packages super simple. But when I try to install a package it gives me an access denied check the password. I ssh into the opsi server and run the command with the same user and password and it works fine. Any idea where I start looking to see whats going on?
pandel
Beiträge: 830
Registriert: 25 Jan 2013, 16:47

Re: Install Access Denied

Beitrag von pandel »

Hi!

But you can build the packages without any problem? If so, than it's really strange as I use the same user account for packing/building and installing...

Could you please post the PLINK log AFTER you get the access denied message? And if you can a screenshot of the message, please! Perhaps we find the problem. If it doesn't open automatically you find it under the Extras menu...

Greetz,
Holger
djm79
Beiträge: 65
Registriert: 04 Feb 2013, 14:03

Re: Install Access Denied

Beitrag von djm79 »

Yes it builds fine but the install fails which is very strange.

Build Log:

Bild

Install Log:

Bild

Access Denied:

Bild

Full Log:

Code: Alles auswählen

----------------------- BUILD ACTION ---------------------------
----------------------------------------------------------------
export PYTHONIOENCODING='utf-8'; cd '/home/opsiproducts/DotNet2.0'; opsi-makeproductfile -vv
chmod: changing permissions of `/home/opsiproducts/DotNet2.0/OPSI/preinst': Operation not permitted
chmod: changing permissions of `/home/opsiproducts/DotNet2.0/OPSI/postinst': Operation not permitted
info: Source dir: /home/opsiproducts/DotNet2.0
info: Temp dir: /tmp
info: Custom name: 
info: Archive format: cpio
debug: Trying to lock file '/home/opsiproducts/DotNet2.0/OPSI/control' (0/2000)
debug: File '/home/opsiproducts/DotNet2.0/OPSI/control' locked after 0 millis
debug: Trying to lock file '/home/opsiproducts/DotNet2.0/OPSI/control' (0/2000)
debug: File '/home/opsiproducts/DotNet2.0/OPSI/control' locked after 0 millis
info: Writing opsi package control file '/home/opsiproducts/DotNet2.0/OPSI/control'
debug: Trying to lock file '/home/opsiproducts/DotNet2.0/OPSI/control' (0/2000)
debug: File '/home/opsiproducts/DotNet2.0/OPSI/control' locked after 0 millis
debug: MessageSubject 'packing' created
debug: ProgressSubject 'packing' created

Creating archive CLIENT_DATA.cpio.gz
debug: Command 'cpio' found at: '/bin/cpio'
debug: Command 'gzip' found at: '/bin/gzip'
info: Executing: /bin/cpio --quiet -v -o -H crc | /bin/gzip --rsyncable > "/tmp/.opsi.pack.MEktI/CLIENT_DATA.cpio.gz"
    0.00% [                                                  ]
    0.00% [                                                  ]
info: Adding file 'uninstall32.ins'
info: Adding file 'delsub32.ins'
info: Adding file 'dotnetfx2.0.exe'
info: Adding file 'dotnet_framework_2.0.png'
info: Adding file 'setup32.ins'
   40.00% [====================                              ]
  100.00% [==================================================]
info: Exit code: 0
  100.00% [==================================================]

notice: Skipping empty dir '/home/opsiproducts/DotNet2.0/SERVER_DATA'

Creating archive OPSI.cpio.gz
info: Executing: /bin/cpio --quiet -v -o -H crc | /bin/gzip --rsyncable > "/tmp/.opsi.pack.MEktI/OPSI.cpio.gz"
    0.00% [                                                  ]
    0.00% [                                                  ]
info: Adding file 'control-20130404-091638.bak'
info: Adding file 'control'
info: Adding file 'control-20130404-091417.bak'
info: Adding file 'preinst'
   50.00% [=========================                         ]
info: Adding file 'postinst'
info: Adding file 'control-20130404-091640.bak'
   66.67% [=================================                 ]
   83.33% [==========================================        ]
  100.00% [==================================================]
info: Exit code: 0
  100.00% [==================================================]

Creating archive dotnet2.0_1.0-1.opsi
info: Executing: /bin/cpio --quiet -v -o -H crc > "/home/opsiproducts/DotNet2.0/dotnet2.0_1.0-1.opsi"
    0.00% [                                                  ]
    0.00% [                                                  ]
info: Adding file 'CLIENT_DATA.cpio.gz'
info: Adding file 'OPSI.cpio.gz'

Locking package

Package info
----------------------------------------------------------------------------
   version              : 1
   custom package name  : 
   incremental package  : False
   package dependencies : 

Product info
----------------------------------------------------------------------------
   product id           : dotnet2.0
   product type         : localboot
   version              : 1.0
   name                 : DotNet2.0
   description          : Please update the description for project: DotNet2.0
   advice               : 
   priority             : 0
   licenseRequired      : False
   product classes      : 
   windows software ids : 

Product scripts
----------------------------------------------------------------------------
   setup                : setup32.ins
   uninstall            : uninstall32.ins
   update               : 
   always               : 
   once                 : 
   custom               : 
   user login           : 

Creating package file '/home/opsiproducts/DotNet2.0/dotnet2.0_1.0-1.opsi'


Cleaning up
Unlocking package

  100.00% [==================================================]
info: Exit code: 0
  100.00% [==================================================]
info: Cleaning up

----------------------- INSTALL ACTION -------------------------
----------------------------------------------------------------
export PYTHONIOENCODING='utf-8'; cd '/home/opsiproducts/DotNet2.0'; opsi-package-manager -i DotNet2.0_1.0-1.opsi

ERROR: Package file '/home/opsiproducts/DotNet2.0/DotNet2.0_1.0-1.opsi' does not exist or access denied
pandel
Beiträge: 830
Registriert: 25 Jan 2013, 16:47

Re: Install Access Denied

Beitrag von pandel »

Many thanks for your logs and screenshots! Let's try if we can find a solution.

First:
opsi-package-manager -i
You should NEVER remove the -q as that breaks the whole opsi-package-manager command under certain circumstances! For now, it is ok because opsi-package-manager won't work at all and shows you a decent error message, but in normal working conditions you have to add the -q again!

Second:
Somehow your opsiadmin user hasn't the right to change permissions on some files. That could be the reason for these too lines in the log file. We should take care of that first. The opsiadmin user has to have the right to execute the "chmod" command on linux side. FWIW, you can also check again, if your opsiadmin user is REALLY in the linux opsiadmin group.
chmod: changing permissions of `/home/opsiproducts/DotNet2.0/OPSI/preinst': Operation not permitted
chmod: changing permissions of `/home/opsiproducts/DotNet2.0/OPSI/postinst': Operation not permitted
Third:
Could you please enter the opsi server root password in the corresponding field under general program settings and execute "Set rights on package" under the "Tools" menu BEFORE you BUILD the package? That issues a special opsi command which corrects any problems which might exist with the package directory. Then rebuild and try to install again.

(Optional) Fourth and if nothing helps, to test if it is a real OPSI PackageBuilder problem:
- login to opsi server console with the user you setup under opsiadmin User in OPSI PackageBuilder
- enter command: cd /home/opsiproducts
- enter command: opsi-setup --set-rights
- enter command: cd DotNet2.0
- enter command: opsi-package-manager -i dotnet2.0_1.0-1.opsi

That definitely has to work! If only the very last steps work, I have to think about it again...

BTW, you're actually using v5.0, right?

Greetz,
Holger
djm79
Beiträge: 65
Registriert: 04 Feb 2013, 14:03

Re: Install Access Denied

Beitrag von djm79 »

I was trying the suggestions you mentioned and changed everything to the settings you recommended. It still didn't work and I noticed in the logs:

Code: Alles auswählen

----------------------- INSTALL ACTION -------------------------
----------------------------------------------------------------
export PYTHONIOENCODING='utf-8'; cd '/home/opsiproducts/DotNet2.0'; opsi-package-manager -i -q DotNet2.0_1.0-1.opsi

ERROR: Package file '/home/opsiproducts/DotNet2.0/DotNet2.0_1.0-1.opsi' does not exist or access denied
But on the package build it says this:

Code: Alles auswählen

Creating package file '/home/opsiproducts/DotNet2.0/dotnet2.0_1.0-1.opsi'
The package names are different the install is looking for DotNet2.0_1.0-1.ops but the actual package is dotnet2.0_1.0-1.opsi. I found that Linux see the capital letters as different files. Let me know if I'm just crazy that the only thing I can find.
pandel
Beiträge: 830
Registriert: 25 Jan 2013, 16:47

Re: Install Access Denied

Beitrag von pandel »

Perfekt! That's it! I'll address that problem in the next version! Many many thanks for finding this out!
vhagel
Beiträge: 11
Registriert: 11 Apr 2013, 11:50

Re: Install Access Denied

Beitrag von vhagel »

Hah, I love this place! :)
I was just experimenting with the Package Builder and had the exact same problem - Package Builds filename first character was lowercase and Install looking for an uppercase first character in the filename.

Looking forward for the new version, it's really a great tool! :)
pandel
Beiträge: 830
Registriert: 25 Jan 2013, 16:47

Re: Install Access Denied

Beitrag von pandel »

Many thanks ;-)! And you don't have to be patient for too long, I think I can publish the new version in about a week or so ;-)
pandel
Beiträge: 830
Registriert: 25 Jan 2013, 16:47

Re: Install Access Denied

Beitrag von pandel »

For everyone who's waiting, new version is online ;-)
vhagel
Beiträge: 11
Registriert: 11 Apr 2013, 11:50

Re: Install Access Denied

Beitrag von vhagel »

Perfect, it's working now. Thanks a lot! :)
Antworten