[решено] Ubuntu Hardy и cron (работает - не - работает? непонятки)

Kubuntu, Xubuntu и другие

Модератор: Модераторы разделов

Аватара пользователя
uptime
Сообщения: 1661
Статус: Drinker with computing problems
ОС: kubuntu 8.04

[решено] Ubuntu Hardy и cron

Сообщение uptime »

На своём компе (kubuntu Hardy + xmonad) всё завелось, а вот перенёс на этот (Ubuntu Hardy) и полный фейл какой-то ):
Начну с того, что через ГУИ Система->Администрирование->Службы cron'a в списке служб вообще нет.
Есть anacron, есть atd, а cron'a нет.
Ладно, идём в консоль:

Код: Выделить всё

tanya@bee:~$ ps aux | grep cron
 root      5604  0.0  0.0   2100   892 ?        Ss   21:48   0:00 /usr/sbin/cron
 tanya     6341  0.0  0.0   3016   764 pts/0    R+   22:06   0:00 grep cron

здесь почему-то нет anacron'a...

Код: Выделить всё

tanya@bee:~$ ls -l /etc/crontab
 -rw-rw---- 1 tanya root 754 2009-09-01 01:24 /etc/crontab

Код: Выделить всё

tanya@bee:~$ cat /etc/crontab
 # /etc/crontab: system-wide crontab
 # Unlike any other crontab you don't have to run the `crontab'
 # command to install the new version when you edit this file
 # and files in /etc/cron.d. These files also have username fields,
 # that none of the other crontabs do.

 SHELL=/bin/sh
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

 # m h dom mon dow user  command
 */1 *   * * *   root    /usr/bin/sc
 17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
 25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
 47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
 52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
 #

Код: Выделить всё

tanya@bee:~$ ls -l /usr/bin/sc
 -rwxrwx--- 1 tanya root 109 2009-08-31 23:41 /usr/bin/sc

Код: Выделить всё

tanya@bee:~$ cat /usr/bin/sc
 #!/bin/sh
 cd /home/tanya
 echo `date` >> done.txt

"раз, два, три. Ничего не происходит." (Хармс)
Что ещё? Ну вот разве..

Код: Выделить всё

tanya@bee:~$ tail /var/log/syslog
 Sep  1 21:48:59 bee ntpd_initres[5921]: host name not found: ntp.landau.ac.ru
 Sep  1 21:48:59 bee ntpd_initres[5921]: couldn't resolve `ntp.landau.ac.ru', giving up on it
 Sep  1 21:49:00 bee hcid[5538]: Default passkey agent (:1.20, /org/bluez/passkey) registered
 Sep  1 21:49:00 bee hcid[5538]: Default authorization agent (:1.20, /org/bluez/auth) registered
 Sep  1 21:49:02 bee kernel: [   68.842904] eth0: no IPv6 routers present
 Sep  1 21:49:04 bee NetworkManager: <info>  Updating allowed wireless network lists.
 Sep  1 21:49:04 bee NetworkManager: <WARN>  nm_dbus_get_networks_cb(): error received: org.freedesktop.NetworkManagerInfo.NoNetworks - There are no wireless networks stored..
 Sep  1 21:52:12 bee ntpd[5919]: synchronized to 129.240.64.3, stratum 2
 Sep  1 21:52:12 bee ntpd[5919]: kernel time sync status change 0001
 Sep  1 22:08:43 bee -- MARK --

Да не оскудеет пиво в ваших кружках :drinks:
The answer, my friend, is blowin' in the wind.
The answer is blowin' in the wind.
Спасибо сказали:
Аватара пользователя
Rootlexx
Бывший модератор
Сообщения: 4471
Статус: GNU generation
ОС: Debian GNU/Linux

Re: [решено] Ubuntu Hardy и cron

Сообщение Rootlexx »

uptime писал(а):
01.09.2009 22:27
-rw-rw---- 1 tanya root 754 2009-09-01 01:24 /etc/crontab

Очень странные права на файл. Насколько я помню, в Cron как-то раз были введены достаточно жёсткие проверки прав. Если выполнить:

Код: Выделить всё

chown root:root /etc/crontab && chmod 644 /etc/crontab
— заработает?
Спасибо сказали:
Аватара пользователя
uptime
Сообщения: 1661
Статус: Drinker with computing problems
ОС: kubuntu 8.04

Re: [решено] Ubuntu Hardy и cron

Сообщение uptime »

Да, спасибо! Заработало!
Странно, но в текущем мане про эти ограничения не сказано ((
Нашел только какой-то старинный ман в архиве opennet.ru, там про это было.
The answer, my friend, is blowin' in the wind.
The answer is blowin' in the wind.
Спасибо сказали: