View Single Post
  #3  
Old 29th October 2012, 14:05
foxx foxx is offline
Junior Member
 
Join Date: Feb 2010
Posts: 4
Thanks: 1
Thanked 2 Times in 1 Post
Default

Thank you for your quick response!

Than it might be the bug I experienced earlier with Shell accounts. But for them it's very obvious what should happen: There I can choose between None/Jailkit environment and can see if this change is working or not.
I reported this and it's nice to see this fixed.

For cronjobs I don't know what's the expected behavior, I tried it with ISPConfig 3.0.5 from svn trunk:

- If I change the "Max allowed cronjob types" in the admin panel for a user the users shell doesn't change

Example:
- User X has cronjob type "URL only", it's shell is /bin/false
- User X adds /var/www/userdomain.tld/web/something.sh to its cronjobs. There is no error message and the user isn't aware in any way that he's only allowed to add URL crons. It just works for him but doesn't get executed (because of /bin/false shell)

- I decided that User X should be able to have full shell cronjobs. That's why I changed the "Max allowed cronjob types" in Limit tab of the user settings to "Full cron".

I would expect that the shell of all sites of this user is now changed to /bin/sh or /bin/bash or anything different from /bin/false

BUT: There is no change in shell. And it's 3.0.5 so it shouldn't be a problem if the users is logged in. There is no error message or anything for the change of the limit. At least the job executes properly.

- Even if the users adds a new cronjob or edits a previously added one the shell doesn't change and the cronjobs aren't working magically as there doesnt seem to be a possibility for the user to see if it's cronjobs executes properly. (Would be great to have a cron log for the user).

- I realized later that the cron insert/delete jobs doesn't move away from the job queue and had a look at the cron log:

Code:
mkdir: cannot create directory `/var/www/clients/client2/web1/var': File exists
mkdir: cannot create directory `/var/www/clients/client2/web1/var/run': File exists
mkdir: cannot create directory `/var/www/clients/client2/web1/var/run/mysqld': File exists
ln: failed to create hard link `/var/www/clients/client2/web1/var/run/mysqld/mysqld.sock': File exists
usermod: user web1 is currently logged in
failed to execute usermod -d /var/www/clients/client2/web1/. -s /usr/sbin/jk_chrootsh web1
failed to modify user web1
usermod: user web1 is currently logged in
PHP Fatal error: Call to a member function mkdir() on a non-object in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php on line 302
So it's still the same problem and at least the cronjob jobs stay in the queue but HOW do I get them to execute again or at least remove them from queue?
I don't even know why the user is logged in as he's not loggedin in a shell (uptime says 1 user logged in and thats root) and there is no process in process table with "web1"

This can't be the final expected behavior.


- (minor) What should happen if I add a executable cronjob /var/www/.../something.sh as admin to a user which is only allowed to run URL cronjob? If that shouldn't be possible there should be an error message
Reply With Quote