• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Cron jobs run in chrooted environment!!

BezNu

New Pleskian
I am sorry, but this is the weirdest feature in Plesk 10 / 11 I have ever found and I am really unhappy with it!

Default behaviour of Plesk is to run cron jobs in a chrooted environment, causing loads of problems, because php and other software are NOT in this chrooted environment.

This causes problems, such as:

"-: .... : No such file or directory" or "sudo: command not found", etc.

The solution offered to this by various people is to enable FULL SHELL access to the MAIN FTP USER of the domain! :O

Please read the line above again... this is a huge security risk!!!!

I have tried several things, such as:

1) Creating an additional FTP user -> Problem: You cannot give shell access to additional FTP users
2) Trying to find out how to create an additional system user -> Problem: I couldn't find any proper documentation on how to do this

So basically I am completely stuck here, I wish there was a way to simply get the "old cron behaviour" back in Plesk 10 / 11 where cron tasks could simply access all of the server's software without limitations.


Does anybody know a way to do this?


Other solution offered was to get all the scripts / binaries / etc you want cron to be able to run in a chrooted shell, I tried this with PHP but this is as far as I can see an impossible way to go. (Dependencies........)
 
There is a way to do this! :)

http://download1.parallels.net/Plesk...uide/66791.htm


/usr/local/psa/admin/bin/server_pref -u -crontab-secure-shell "/bin/sh"

Unfortunately, this is exactly what I mentioned when I said:

The solution offered to this by various people is to enable FULL SHELL access to the MAIN FTP USER of the domain! :O


Because, when you run that command, you will enable full shell access to the main FTP users of every domain, which I really don't want to do. Seriously, I had issues with stolen FTP passwords more than once and then it is better to have one subscription / domain hacked, than your entire server. Moreover, if you want to have SFTP, you need a chrooted shell.

In good ol' Plesk crons did have access to all of the server, but the FTP users could have chrooted shell and this was not connected to cron access in any way.
 
Back
Top