• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Cant reset plesk password

Rafael Santos

New Pleskian
We encounter the following error when trying to change the administrator password, including from the Web interface.

plesk bin admin --set-admin-password -passwd "*******"

Unable to change administrator's password: copy_file failed: Path '/var/opt/psa/tmp/apwS4YSs7' is not whithin safe paths list
copy_file: System Error: invalid file paths in /opt/psa/admin/bin/copy_file: /var/opt/psa/tmp/apwS4YSs7 /etc/psa/.psa.shadow
exit status 1

After that the plesk installation is broken, and we need apply the following solution to recover access to Plesk:

Unable to access Plesk on Linux after manually changing the MySQL "admin" password: Access denied for user 'admin'@'localhost' (using password: YES)

we have already tried plesk repair tool and nothing works. Any help is really appreciated, we need change the admin password ASAP, thanks
 
We encounter the following error when trying to change the administrator password, including from the Web interface.

plesk bin admin --set-admin-password -passwd "*******"

Unable to change administrator's password: copy_file failed: Path '/var/opt/psa/tmp/apwS4YSs7' is not whithin safe paths list
copy_file: System Error: invalid file paths in /opt/psa/admin/bin/copy_file: /var/opt/psa/tmp/apwS4YSs7 /etc/psa/.psa.shadow
exit status 1

After that the plesk installation is broken, and we need apply the following solution to recover access to Plesk:

Unable to access Plesk on Linux after manually changing the MySQL "admin" password: Access denied for user 'admin'@'localhost' (using password: YES)

we have already tried plesk repair tool and nothing works. Any help is really appreciated, we need change the admin password ASAP, thanks
Firstly, you must solve mysql access... then

plesk login
and then change it from plesk GUI
 
Firstly, you must solve mysql access... then

plesk login
and then change it from plesk GUI

Sorry, It seems I did not explain myself well.
The mysql access problem happen every time I what to reset the password.

The plesk works well, and every time I try to reset the admin password the above error happen, Unable to change administrator's password: copy_file failed:... and after that the plesk does not works any more due to database error and we need fix that every time. At this moment we are unable to reset the admin password without broken the plesk service.
 
Sorry, It seems I did not explain myself well.
The mysql access problem happen every time I what to reset the password.

The plesk works well, and every time I try to reset the admin password the above error happen, Unable to change administrator's password: copy_file failed:... and after that the plesk does not works any more due to database error and we need fix that every time. At this moment we are unable to reset the admin password without broken the plesk service.

Problem is the same if you try to do it by Plesk interface?
 
Can you provide me the output for these commands?

Code:
# plesk -v
# grep -v \# /etc/psa/psa.conf
 
Can you provide me the output for these commands?

Code:
# plesk -v
# grep -v \# /etc/psa/psa.conf

# plesk -v
Code:
Product version: Plesk Obsidian 18.0.26.0
     OS version: Ubuntu 18.04 x86_64
     Build date: 2020/04/10 18:00
       Revision: f01f47b9bea31b4186ff330d137e1aea57bb084a

grep -v \# /etc/psa/psa.conf
Code:
PRODUCT_ROOT_D /opt/psa

PRODUCT_RC_D /etc/init.d

PRODUCT_ETC_D /opt/psa/etc

PLESK_LIBEXEC_DIR /usr/lib/plesk-9.0

HTTPD_VHOSTS_D /var/www/vhosts

HTTPD_CONF_D /etc/apache2

HTTPD_INCLUDE_D /etc/apache2/conf-enabled

HTTPD_BIN /usr/sbin/apache2

HTTPD_LOG_D /var/log/apache2

HTTPD_SERVICE apache2

QMAIL_ROOT_D /var/qmail

PLESK_MAILNAMES_D /var/qmail/mailnames

RBLSMTPD /usr/sbin/rblsmtpd

NAMED_RUN_ROOT_D /var/named/run-root

WEB_STAT /usr/bin/webalizer

MYSQL_VAR_D /var/lib/mysql
MYSQL_BIN_D /usr/bin
MYSQL_SOCKET /var/run/mysqld/mysqld.sock

PGSQL_DATA_D /var/lib/postgresql//main
PGSQL_CONF_D /etc/postgresql//main
PGSQL_BIN_D /usr/lib/postgresql/9.3/bin

DUMP_D /var/lib/psa/dumps
DUMP_TMP_D /tmp

MAILMAN_ROOT_D /usr/lib/mailman
MAILMAN_VAR_D /var/lib/mailman

PYTHON_BIN /usr/bin/python

DRWEB_ROOT_D /opt/drweb
DRWEB_ETC_D  /etc/drweb

GPG_BIN /usr/bin/gpg

TAR_BIN /bin/tar

AWSTATS_ETC_D /etc/awstats
AWSTATS_BIN_D /usr/lib/cgi-bin
AWSTATS_TOOLS_D /usr/share/awstats/tools
AWSTATS_DOC_D /usr/share/awstats

OPENSSL_BIN /usr/bin/openssl

LIB_SSL_PATH /lib/libssl.so
LIB_CRYPTO_PATH /lib/libcrypto.so

CLIENT_PHP_BIN /opt/psa/bin/php-cli

SNI_SUPPORT true

APS_DB_DRIVER_LIBRARY /usr/lib/x86_64-linux-gnu/sw/libmysqlserver.so.2.0

SA_MAX_MAIL_SIZE 256000
 
Please provide me also:
Code:
# ls -la /usr/local/
# ls -la /usr/local/psa/
# ls -la /opt/
# ls -la /opt/psa/
# ls -la /var/
# find / -type l -iname psa
# find / -type l -iname tmp
# find / -type l -iname opt
 
Please provide me also:
Code:
# ls -la /usr/local/
# ls -la /usr/local/psa/
# ls -la /opt/
# ls -la /opt/psa/
# ls -la /var/
# find / -type l -iname psa
# find / -type l -iname tmp
# find / -type l -iname opt

# ls -la /usr/local/
Code:
drwxr-xr-x 14 root root 4096 Mar  3 18:11 .
drwxr-xr-x 15 root root 4096 May  6 02:21 ..
drwxr-xr-x  2 root root 4096 Dec  3 09:50 bin
drw-------  6 root root 4096 Dec 27 20:44 csf
drwxr-xr-x  3 root root 4096 Mar  3 18:11 doc
drwxr-xr-x  2 root root 4096 Mar  4  2014 etc
drwxr-xr-x  2 root root 4096 Mar  4  2014 games
drwxr-xr-x  4 root root 4096 Oct  9  2018 include
drwxr-xr-x  7 root root 4096 May  6  2019 lib
lrwxrwxrwx  1 root root    9 Jan 13  2016 man -> share/man
drwxr-xr-x  3 root root 4096 Jun 27  2018 n
drwxr-xr-x  2 root root 4096 Apr 19 04:34 patchman
lrwxrwxrwx  1 root root    8 Jun 13  2018 psa -> /opt/psa
drwxr-xr-x  2 root root 4096 Oct  7  2014 sbin
drwxr-xr-x 10 root root 4096 May  6  2019 share
drwxr-xr-x  2 root root 4096 Mar  4  2014 src

ls -la /usr/local/psa/
Code:
drwxr-xr-x 14 root   root    4096 Apr 28 07:55 .
drwxr-xr-x 13 root   root    4096 Apr 13 06:26 ..
drwxr-xr-x 19 root   root    4096 Dec 26 14:22 admin
drwxr-xr-x  2 root   root   12288 Apr 28 07:54 bin
drwxr-xr-x  9 root   root    4096 Apr 28 07:53 bootstrapper
drwxr-xr-x  9 root   root    4096 Apr 28 07:54 etc
drwxr-xr-x  8 root   root    4096 May  7  2019 handlers
drwxr-xr-x  3 root   root    4096 Jan 13  2016 lib
drwxr-xr-x  3 root   root    4096 May 13  2019 libexec
drwxr-xr-x  4 root   root    4096 Dec 26 14:21 logrotate
drwxr-xr-x  2 root   root    4096 Mar  3 05:18 pam_plesk_config
drwxr-xr-x 10 root   root    4096 Apr 28 07:54 PMM
-rw-r--r--  1 root   root      41 Apr 10 07:12 .revision
drwxrwxrwt  5 root   root    4096 May  6 09:10 tmp
drwxr-xr-x 16 psaadm psaadm  4096 Apr 28 07:54 var
-rw-r--r--  1 root   root      35 Apr 10 07:12 version

ls -la /opt/
Code:
drwxr-xr-x 13 root     root     4096 Apr 13 06:26 .
drwxr-xr-x 25 root     root     4096 May  6 02:21 ..
drwxr-xr-x  3 root     root     4096 May  6 06:35 ai-bolit
drwxr-xr-x 15 root     root     4096 May  6 06:35 alt
drwx--x--x  4 root     root     4096 Apr 23  2019 containerd
drwxr-xr-x  3 root     root     4096 Apr 13 06:26 i360_pam_imunify
drwxr-xr-x  4 root     root     4096 May  5 14:21 imunify360
drwxr-xr-x 12 root     root     4096 Dec 26 13:44 imunify360-webshield
drwxr-xr-x  3 root     root     4096 Jun 14  2019 jdk
drwxrwxrwx  3 root     root     4096 Jul 12  2019 mercure
drwxr-x---  2 newrelic newrelic 4096 Jun 19  2017 newrelic
drwxr-xr-x  5 root     root     4096 Jan 24  2019 plesk
drwxr-xr-x 14 root     root     4096 Apr 28 07:55 psa

ls -la /var/
Code:
drwxr-xr-x 25 root root    4096 May  6 02:21 .
drwxr-xr-x 24 root root    4096 May  6 02:21 ..
drwxr-xr-x  2 root root    4096 Jan 15  2016 adminarea
drwxr-xr-x  7 root root    4096 May  6  2019 asl
drwxr-xr-x  2 root root    4096 May  6 06:36 backups
drwxr-xr-x 20 root root    4096 Dec 26 11:24 cache
drwxrwxrwt  2 root root    4096 May  5 06:36 crash
drwxr-xr-x  4 root root    4096 Jan 13 06:36 i360_pam_imunify
drwxr-xr-x  8 root root    4096 May  6 06:36 imunify360
drwxr-xr-x 97 root root    4096 Apr 13 06:35 lib
drw-r-----  2 list root    4096 Jan 13  2016 list
drwxrwsr-x  3 root staff   4096 Mar  3 18:11 local
lrwxrwxrwx  1 root root       9 Jan 13  2016 lock -> /run/lock
drwxrwxr-x 48 root syslog 12288 May  6 06:36 log
drwx------  2 root root   16384 Jan 13  2016 lost+found
drwxrwsr-x  2 root mail    4096 Jun  5  2019 mail
-rw-rw-r--  1 root root       5 May  6 02:21 .mp
drwxr-xr-x  3 root root    4096 Jun 13  2017 named
drwxr-xr-x 13 root root    4096 Apr 13 06:26 opt
dr-xr-x--- 12 root ossec   4096 Dec 26 13:44 ossec
drwxr-xr-x  2 root root    4096 Jul 27  2016 parallels
-rw-r--r--  1 root root   12608 Mar 15  2019 proftpd.delay
drwxr-xr-x  7 root root    4096 Jan 21  2016 qmail
lrwxrwxrwx  1 root root       4 Jan 13  2016 run -> /run
drwxr-xr-x  3 root root    4096 Aug 17  2018 sftp
drwxr-xr-x  7 root root    4096 May  8  2019 spool
drwxrwxrwt 12 root root    4096 May  6 09:09 tmp
drwxr-xr-x  3 root root    4096 Jan 16  2016 webtools
drwxr-xr-x 11 root root    4096 Dec 27 11:33 www

find / -type l -iname psa
/usr/local/psa

find / -type l -iname tmp
/dev/vg00/tmp find: '/proc/2253': No such file or directory

find / -type l -iname opt
/opt
 
Can you provide me
Code:
# ls -la /
# ls -la /var/opt/
# ls -la /
Code:
drwxr-xr-x  24 root root   4096 May  6 02:21 .
drwxr-xr-x  24 root root   4096 May  6 02:21 ..
drwxr-xr-x   2 root root   4096 Apr 28 06:26 bin
drwxr-xr-x   4 root root   4096 Apr 30 06:12 boot
drwxr-xr-x  21 root root   4096 May  6 02:21 data
drwxr-xr-x  21 root root   4260 Mar 20 08:55 dev
drwxr-xr-x 187 root root  12288 May  5 20:00 etc
drwxr-xr-x   8 root root   4096 May  6 02:21 home
lrwxrwxrwx   1 root root     33 Apr 29 06:31 initrd.img -> boot/initrd.img-4.15.0-99-generic
lrwxrwxrwx   1 root root     33 Apr 29 06:31 initrd.img.old -> boot/initrd.img-4.15.0-96-generic
drwxr-xr-x  24 root root   4096 May  6  2019 lib
drwxr-xr-x   2 root root   4096 May  6  2019 lib32
drwxr-xr-x   2 root root   4096 May  6  2019 lib64
drwx------   2 root root  49152 Jan 13  2016 lost+found
drwxr-xr-x   3 root root   4096 Mar  4  2014 media
drwxr-xr-x   2 root root   4096 Sep 22  2016 mnt
-rw-rw-r--   1 root root      2 May  6 02:21 .mp
lrwxrwxrwx   1 root root      8 Jul  2  2019 opt -> /var/opt
dr-xr-xr-x 488 root root      0 Jan  2 08:53 proc
-rw-------   1 root root   1024 Apr 13 06:26 .rnd
drwx------  32 root root   4096 May  6 09:35 root
drwxr-xr-x   2 root root   4096 Jan 13  2016 .rpmdb
drwxr-xr-x  48 root root   1960 May  6 09:41 run
drwxr-xr-x   2 root root  12288 Apr 28 06:26 sbin
drwxr-xr-x   2 root root   4096 Mar  4  2014 srv
dr-xr-xr-x  13 root root      0 Jan 16 10:34 sys
drwxrwxrwt 197 root root 290816 May  6 09:40 tmp
drwxr-xr-x  15 root root   4096 May  6 02:21 usr
drwxr-xr-x  25 root root   4096 May  6 02:21 var
lrwxrwxrwx   1 root root     30 Apr 29 06:31 vmlinuz -> boot/vmlinuz-4.15.0-99-generic
lrwxrwxrwx   1 root root     30 Apr 29 06:31 vmlinuz.old -> boot/vmlinuz-4.15.0-96-generic

ls -la /var/opt/
Code:
drwxr-xr-x 13 root     root     4096 Apr 13 06:26 .
drwxr-xr-x 25 root     root     4096 May  6 02:21 ..
drwxr-xr-x  3 root     root     4096 May  6 06:35 ai-bolit
drwxr-xr-x 15 root     root     4096 May  6 06:35 alt
drwx--x--x  4 root     root     4096 Apr 23  2019 containerd
drwxr-xr-x  3 root     root     4096 Apr 13 06:26 i360_pam_imunify
drwxr-xr-x  4 root     root     4096 May  5 14:21 imunify360
drwxr-xr-x 12 root     root     4096 Dec 26 13:44 imunify360-webshield
drwxr-xr-x  3 root     root     4096 Jun 14  2019 jdk
drwxrwxrwx  3 root     root     4096 Jul 12  2019 mercure
drwxr-x---  2 newrelic newrelic 4096 Jun 19  2017 newrelic
drwxr-xr-x  5 root     root     4096 Jan 24  2019 plesk
drwxr-xr-x 14 root     root     4096 Apr 28 07:55 psa
 
# ls -la /
...
lrwxrwxrwx 1 root root 8 Jul 2 2019 opt -> /var/opt

# find / -type l -iname opt
/opt

According to these outputs from the commands above, the /opt folder is a symlink pointing to /var/opt and this configuration is incorrect
The /opt and /var/opt folders must be independent at file system level, therefore, it's required to do the following because Plesk uses /opt folder path:
# unlink /opt
# mv /var/opt /opt
# mkdir /var/opt

Here from my test server:

Code:
root@u18p18:~# ls -la / | grep opt
drwxr-xr-x  11 root root       4096 Apr 27 15:12 opt
root@u18p18:~# ls -la /opt
total 44
drwxr-xr-x 11 root root 4096 Apr 27 15:12 .
drwxr-xr-x 25 root root 4096 May  1 06:34 ..
drwxr-xr-x  3 root root 4096 Apr 30 05:26 ai-bolit
drwxr-xr-x 14 root root 4096 Apr 27 15:12 alt
drwxr-xr-x  9 root root 4096 Apr 17 13:45 drweb
drwxr-xr-x  3 root root 4096 Apr 27 15:14 i360_pam_imunify
drwxr-xr-x  3 root root 4096 Apr 27 15:12 imunify360
drwxr-xr-x 12 root root 4096 Apr 27 15:12 imunify360-webshield
drwxr-xr-x  3 root root 4096 Apr 17 13:40 kav
drwxr-xr-x  6 root root 4096 Apr 17 14:05 plesk
drwxr-xr-x 13 root root 4096 Apr 17 13:37 psa
root@u18p18:~# ls -la /var/ | grep opt
drwxr-xr-x  2 root  root   4096 Feb  3 18:22 opt
root@u18p18:~# ls -la /var/opt/
total 8
drwxr-xr-x  2 root root 4096 Feb  3 18:22 .
drwxr-xr-x 22 root root 4096 Apr 27 15:13 ..

As you can see Plesk does not store anything in /var/opt path
 
yes ... we had to do that, our hosting provider install the server with only 2GB in the root partition. And we had troubleshooting with low space very frequently. This solution have some years, and until now never has problem and plesk always has been updated without problems, do you think that's the problem? any solution?
 
Back
Top