• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Cron in virtual server with Plesk 12.5 can't find the find command

IATechsupport

Basic Pleskian
I'm trying to setup a simple cron job from Plesk GUI to delete the contents of a dir every day.

with:

find /var/www/vhosts/domain.name/httpdocs/var/session -name 'sess*' -type f -print -delete

when I run it all I get is " find command not found"
 
Hi IATechsupport,
try using the full path to find...


Code:
/usr/bin/find /var/www/vhosts/domain.name/httpdocs/var/session -name 'sess*' -type f -print -delete

Regards

Lloyd
 
Where are you running the command from? Under the domain, or in...

Tools & Setting > Scheduled Tasks

Regards

Lloyd

EDIT: If under the domain try like...

/usr/bin/find /httpdocs/var/session -name 'sess*' -type f -print -delete
or
find /httpdocs/var/session -name 'sess*' -type f -print -delete

Should work too.
 
Last edited:
we also get this error when we logout of Plesk client control panel,

ERROR: PleskFatalException
Original link and target URL should be on the same domain.

Not sure if it's related in some way

regards
Alan
 
I had the same issue. Solution of KB #115889 works great. Thanks!

But you should be aware of that users may be able to do things in the global environment. This could be a security issue.

It might be better to add the application to the chroot environment: https://kb.plesk.com/de/115842
 
Thanks for that info, I want to try and add "Find" to the chrooted environment, but my attempts such as this ./chroot_update.sh --add '/usr/bin/find' come back with a warning
find is not a program file.

How then do I add it ?

Thanks
 
Install find...

Debian
# apt-get install findutils

CentOS
# yum install findutils

If I remember correctly.
Regards

Lloyd
 
Hi IATechsupport,

when "findutils" are installe, you might use:

./chroot_update.sh --add `which find`

or​

/FULL/PATH/TO/chroot_update.sh --add `which find`
 
I tried: ./root/chroot_update.sh --add 'which find'

and the response was:

./root/chroot_update.sh: line 240: [: which: binary operator expected
WARNING: which is not a program (filetype cannot open `which' (No such file or directory)). Skipping.
 
Back
Top