/etc/sw/keys broken permissions after upgrade

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 10.4 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux
  • MG:f846713d6ee4f8ca97b0ffb96020e1b6
  • MT:112a1c2138ad635952fa48c62c85364a
  • MT:594507dfc6f6df5d48edc6cdaaae333b

Created:

2016-11-16 12:59:26 UTC

Modified:

2017-02-13 06:12:55 UTC

0

Was this article helpful?


Have more questions?

Submit a request

/etc/sw/keys broken permissions after upgrade

Symptoms

When logging into Plesk, one of the following errors occurs:

Repository is not opened

0: Abstract.php:97
of_get_key_by_product(string 'plesk-unix')
1: Abstract.php:97
Smb_Application_Abstract::getKey()
2: General.php:25
Smb_License_General::getInstance()
3: Restrictions.php:38
CommonPanel_Aps_Restrictions->isStorefrontEnabled()
4: CatalogsConfiguration.php:49
Smb_Plesk_Bridge_Aps_CatalogsConfiguration->_getDefaultCatalogConfig()
5: CatalogsConfiguration.php:123
Smb_Plesk_Bridge_Aps_CatalogsConfiguration->getCatalogConfigs()
6: Catalog.php:108
Smb_Plesk_Bridge_Aps_Catalog::_getCatalogsConfig()
7: Catalog.php:169
Smb_Plesk_Bridge_Aps_Catalog::getCatalogsByType(string 'apscatalog')
8: Config.php:59
HelpDesk_Config::_getApsCatalogId()
9: Config.php:50

OR

ERROR: SWKeyExFatalError
error: Cannot open file

0: common_func.php3:4480
of_get_key_by_product(string 'plesk-unix')
1: common_func.php3:4480
getPleskKey()
2: common_func.php3:4559
getKeyProp(string 'demo')
3: auth.php3:48

OR

ERROR: SWKeyExFatalError
error: /etc/sw/keys/lock/repository: cannot create: Permission denied

Cause

  • An absent psaadm user in the swkey-data group.
  • Broken permissions on the /etc/sw/keys directory.
  • Broken permissions on the /etc/sw/keys/lock/repository directory.
  • Some files or directories were removed from /etc/sw/keys directory.

Resolution

  1. Check which directories are absent and recover them (it's possible to copy from test environment).

  2. Set the correct permissions by following the commands below:

    # /usr/sbin/usermod -a -G swkey-data psaadm
    # chown -R root:swkey-data /etc/sw/keys/
    # chmod u+s /etc/sw/keys/restart/apskeyhandler /etc/sw/keys/restart/plesk-key-handler
    # chmod 2770 /etc/sw/keys
    # chmod 2770 /etc/sw/keys/instances
    # chmod 2770 /etc/sw/keys/lock
    # chmod 2770 /etc/sw/keys/restart
    # chmod 660 /etc/sw/keys/lock/repository
  3. Restart psa service:

    # service psa restart
Have more questions? Submit a request
Please sign in to leave a comment.