Commit ffc86685 authored by Chris Graham's avatar Chris Graham
Browse files

Fixed MANTIS-4350 (Canonicalise cron_bridge.sh and fixing of .sh script permissions)

parent 3f9d368d
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -145,15 +145,11 @@ A good test is to try running the command you end up choosing manually in a comm

You should schedule Composr's [tt]cron_bridge.php[/tt] script to be loaded at least every 10 minutes.

[title="4"]Sandboxed CRON[/title]
[title="4"]Sandboxed Cron[/title]

Some webhosts only allow you to execute CRON commands directly under your home directory. This means you cannot call up the PHP command directory like above.
A workaround is to make a [tt]data/cron_bridge.sh[/tt] file (with execute permissions) containing:
[code="Bash"]
#!/bin/sh
php cron_bridge.php
[/code]
and tell CRON to execute [tt]/home/examplesite/htdocs/data/cron_bridge.sh[/tt].
Some webhosts only allow you to execute Cron commands directly under your home directory. This means you cannot call up the PHP command directory like above.
A workaround is to use [tt]data/cron_bridge.sh[/tt] instead, which just asks as a wrapper around the regular [tt]cron_bridge.php[/tt]. Tell CRON to execute [tt]/home/examplesite/htdocs/data/cron_bridge.sh[/tt].
[tt]u+x[/tt] permissions should be set on [tt]data/cron_bridge.sh[/tt] ([tt]744[/tt] permissions).

[title="3"]Specific advice for Windows[/title]

+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ fi
# Change permissions
chmod -f a+w adminzone/pages/comcode_custom/* adminzone/pages/comcode_custom/*/*.txt adminzone/pages/html_custom/* adminzone/pages/html_custom/*/*.htm caches/* caches/lang/* cms/pages/comcode_custom/* cms/pages/comcode_custom/*/*.txt cms/pages/html_custom/* cms/pages/html_custom/*/*.htm collaboration/pages/comcode_custom/* collaboration/pages/comcode_custom/*/*.txt collaboration/pages/html_custom/* collaboration/pages/html_custom/*/*.htm data_custom/errorlog.php data_custom/firewall_rules.txt data_custom/modules/admin_backup data_custom/modules/admin_backup/* data_custom/modules/admin_stats data_custom/modules/admin_stats/* data_custom/modules/chat data_custom/modules/chat/* data_custom/modules/web_notifications data_custom/modules/web_notifications/* data_custom/sitemaps data_custom/sitemaps/* data_custom/spelling/personal_dicts data_custom/spelling/personal_dicts/* data_custom/xml_config data_custom/xml_config/*.xml exports/* exports/*/* forum/pages/comcode_custom/* forum/pages/comcode_custom/*/*.txt forum/pages/html_custom/* forum/pages/html_custom/*/*.htm imports/* imports/*/* lang_custom lang_custom/* lang_custom/*/*.ini pages/comcode_custom/* pages/comcode_custom/*/*.txt pages/html_custom/* pages/html_custom/*/*.htm safe_mode_temp safe_mode_temp/* site/pages/comcode_custom/* site/pages/comcode_custom/*/*.txt site/pages/html_custom/* site/pages/html_custom/*/*.htm text_custom text_custom/* text_custom/*.txt text_custom/*/*.txt themes themes/*/css_custom themes/*/css_custom/* themes/*/images_custom themes/*/images_custom/* themes/*/javascript_custom themes/*/javascript_custom/* themes/*/templates_cached/* themes/*/templates_custom themes/*/templates_custom/* themes/*/text_custom themes/*/text_custom/* themes/*/theme.ini themes/*/xml_custom themes/*/xml_custom/* themes/map.ini uploads/* _config.php 2>/dev/null
chmod -f a+w data_custom/failover_rewritemap.txt data_custom/failover_rewritemap__mobile.txt
chmod -f u+x *.sh data/*.sh
echo "3/4 Fixed permissions of strewn files"

# Demonstratr
+1 −0
Original line number Diff line number Diff line
@@ -985,6 +985,7 @@ class Hook_addon_registry_core
            'sources_custom/hooks/systems/startup/index.html',
            'data/confirm_session.php',
            'data/cron_bridge.php',
            'data/cron_bridge.sh',
            'data/curl-ca-bundle.crt',
            'data/db_meta.bin',
            'data/empty.html',