Jump to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Crond Emails Message: "sh: /chmod: No such file or directory"

Featured Replies

Every five minutes crond is sending me this email:

From root@frox.example.com  Thu Nov 17 11:50:02 2011
X-Original-To: root
From: root@frox.example.com (Cron Daemon)
To: root@frox.example.com
Subject: Cron <root@example> /usr/bin/php5 -q /var/www/froxlor/scripts/froxlor_master_cronjob.php
Content-Type: text/plain; charset=ANSI_X3.4-1968
X-Cron-Env: <PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <LOGNAME=root>
Date: Thu, 17 Nov 2011 11:50:01 -0500 (EST)

sh: /chmod: No such file or directory

 

I believe this may be related to the problem I have I posted about at:

http://redmine.froxlor.org/issues/978

 

How can I find out what file path chmod does not find?

This error does not mean that chmod cannot find a path, but that it cannot find the binary 'chmod' unter the system root,

which is perfectly normal since the file is located in /bin/

 

Now the question remains; WTF is it trying to do? =)

Easiest way to get it's start parameters is by creating a file called "chmod" in the absolute root of your server, containing:

#!/bin/sh
echo $@ > /chmod.log
/bin/chmod $@

 

Then make it executable by "chmod +x /chmod" and either wait for the cron to run or start it with "php5 -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --force"

Afterwards please post the contents of /chmod.log

 

If this is not very informative, you should install the PHP XDebug Extension and enable it on the CLI by adding the following options to php-cli's php.ini:

xdebug.profiler_enable = true
xdebug.profiler_output_dir = "/tmp/froxlorcron/"
xdebug.profiler_output_name = "froxlor_master_cronjob.php.%u"

and create the folder /tmp/froxlorcron

 

Then, run the cronjob and run the generated /tmp/froxlorcron/froxlor_master_cronjob.php.UNIXTIME through KCacheGrind or WinCacheGrind to see where it's been calling chmod.

 

 

Note that you should disable xdebug afterwards again as it slows down the execution quite a lot and requires a fair chunk of disk, cpu and memory,

Archived

This topic is now archived and is closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.