У меня возникла проблема с моим Linux 16.04 с момента обновления U с Linux 14.04. Я получаю ошибки разрешения, пытаясь получить доступ к файлам или выполнить команду. Я как бы решил, что некоторые из решений здесь. В последнее время, пытаясь получить доступ к phpmyadmin, говорит, что у меня нет разрешения, и я его удаляю, поэтому я могу переустановить, но затем, когда я перезапускаю сервер Apache, я получаю это сообщение об ошибке.
sudo apt-get purge phpmyadmin
Я установил phpmyadmin и это было нормально, затем я перезапускаю apache и получил ошибку
sudo service apache2 restart
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
Я искал форум, чтобы узнать, что это за ошибка, и я выполняю команды, чтобы получить все следующее, о которых я понятия не имею. Я буду благодарен за любую помощь в этом.
journalctl | tail:
Jan 11 05:06:01 cron[1010]: (*system*popularity-contest) INSECURE MODE (group/other writable) (/etc/cron.d/popularity-contest)
Jan 11 05:06:01 cron[1010]: (*system*anacron) INSECURE MODE (group/other writable) (/etc/cron.d/anacron)
Jan 11 05:07:01 cron[1010]: (*system*) INSECURE MODE (group/other writable) (/etc/crontab)
Jan 11 05:07:01 cron[1010]: (*system*php) INSECURE MODE (group/other writable) (/etc/cron.d/php)
Jan 11 05:07:01 cron[1010]: (*system*popularity-contest) INSECURE MODE (group/other writable) (/etc/cron.d/popularity-contest)
Jan 11 05:07:01 cron[1010]: (*system*anacron) INSECURE MODE (group/other writable) (/etc/cron.d/anacron)
Jan 11 05:08:01 cron[1010]: (*system*) INSECURE MODE (group/other writable) (/etc/crontab)
Jan 11 05:08:01 cron[1010]: (*system*php) INSECURE MODE (group/other writable) (/etc/cron.d/php)
Jan 11 05:08:01 cron[1010]: (*system*popularity-contest) INSECURE MODE (group/other writable) (/etc/cron.d/popularity-contest)
Jan 11 05:08:01 cron[1010]: (*system*anacron) INSECURE MODE (group/other writable) (/etc/cron.d/anacron)
systemctl status apache2.service:
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Thu 2018-01-11 05:02:42 WAT; 8min ago
Docs: man:systemd-sysv-generator(8)
Process: 29327 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 29845 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jan 11 05:02:42 apache2[29845]: *
Jan 11 05:02:42 apache2[29845]: * The apache2 configtest failed.
Jan 11 05:02:42 apache2[29845]: Output of config test was:
Jan 11 05:02:42 apache2[29845]: apache2: Syntax error on line 216 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apa
Jan 11 05:02:42 apache2[29845]: Action 'configtest' failed.
Jan 11 05:02:42 apache2[29845]: The Apache error log may have more information.
Jan 11 05:02:42 systemd[1]: apache2.service: Control process exited, code=exited status=1
Jan 11 05:02:42 systemd[1]: Failed to start LSB: Apache2 web server.
Jan 11 05:02:42 systemd[1]: apache2.service: Unit entered failed state.
Jan 11 05:02:42 systemd[1]: apache2.service: Failed with result 'exit-code'.
journalctl -xe: [ ! d5] Jan 11 05:12:01 cron[1010]: (*system*php) INSECURE MODE (group/other writab
Jan 11 05:12:01 cron[1010]: (*system*popularity-contest) INSECURE MODE (gro
Jan 11 05:12:01 cron[1010]: (*system*anacron) INSECURE MODE (group/other wr
Jan 11 05:13:01 cron[1010]: (*system*) INSECURE MODE (group/other writable)
Jan 11 05:13:01 cron[1010]: (*system*php) INSECURE MODE (group/other writab
Jan 11 05:13:01 cron[1010]: (*system*popularity-contest) INSECURE MODE (gro
Jan 11 05:13:01 cron[1010]: (*system*anacron) INSECURE MODE (group/other wr
Jan 11 05:13:42 com.canonical.Unity.Scope.Applications[1661]: Error loading
Jan 11 05:13:42 com.canonical.Unity.Scope.Applications[1661]: (unity-scope-
Jan 11 05:13:45 com.canonical.Unity.Scope.Music[1661]: (unity-music-daemon:
Jan 11 05:13:45 com.canonical.Unity.Scope.Music[1661]: (unity-music-daemon:
Jan 11 05:14:01 cron[1010]: (*system*) INSECURE MODE (group/other writable)
Jan 11 05:14:01 cron[1010]: (*system*php) INSECURE MODE (group/other writab
Jan 11 05:14:01 cron[1010]: (*system*popularity-contest) INSECURE MODE (gro
Jan 11 05:14:01 cron[1010]: (*system*anacron) INSECURE MODE (group/other wr
Jan 11 05:15:01 cron[1010]: (*system*) INSECURE MODE (group/other writable)
Jan 11 05:15:01 cron[1010]: (*system*php) INSECURE MODE (group/other writab
Jan 11 05:15:01 cron[1010]: (*system*popularity-contest) INSECURE MODE (gro
Jan 11 05:15:01 cron[1010]: (*system*anacron) INSECURE MODE (group/other wr
Jan 11 05:16:01 cron[1010]: (*system*) INSECURE MODE (group/other writable)
Jan 11 05:16:01 cron[1010]: (*system*php) INSECURE MODE (group/other writab
Jan 11 05:16:01 cron[1010]: (*system*popularity-contest) INSECURE MODE (gro
Jan 11 05:16:01 cron[1010]: (*system*anacron) INSECURE MODE (group/other wr
lines 1510-1532/1532 (END)
Jan 11 05:12:01 cron[1010]: (*system*php) INSECURE MODE (group/other writable) (/etc/cron.d/php)
Jan 11 05:12:01 cron[1010]: (*system*popularity-contest) INSECURE MODE (group/other writable) (/etc/cron.d/popularity-contest)
Jan 11 05:12:01 cron[1010]: (*system*anacron) INSECURE MODE (group/other writable) (/etc/cron.d/anacron)
Jan 11 05:13:01 cron[1010]: (*system*) INSECURE MODE (group/other writable) (/etc/crontab)
Jan 11 05:13:01 cron[1010]: (*system*php) INSECURE MODE (group/other writable) (/etc/cron.d/php)
Jan 11 05:13:01 cron[1010]: (*system*popularity-contest) INSECURE MODE (group/other writable) (/etc/cron.d/popularity-contest)
Jan 11 05:13:01 cron[1010]: (*system*anacron) INSECURE MODE (group/other writable) (/etc/cron.d/anacron)
Jan 11 05:13:42 com.canonical.Unity.Scope.Applications[1661]: Error loading package indexes: Couldn't stat '/var/cache/software-center/xap
Jan 11 05:13:42 com.canonical.Unity.Scope.Applications[1661]: (unity-scope-loader:29986): unity-applications-daemon-CRITICAL **: daemon.va
Jan 11 05:13:45 com.canonical.Unity.Scope.Music[1661]: (unity-music-daemon:30019): unity-music-daemon-WARNING **: rhythmbox-collection.val
Jan 11 05:13:45 com.canonical.Unity.Scope.Music[1661]: (unity-music-daemon:30019): unity-music-daemon-WARNING **: rhythmbox-collection.val
Jan 11 05:14:01 cron[1010]: (*system*) INSECURE MODE (group/other writable) (/etc/crontab)
Jan 11 05:14:01 cron[1010]: (*system*php) INSECURE MODE (group/other writable) (/etc/cron.d/php)
Jan 11 05:14:01 cron[1010]: (*system*popularity-contest) INSECURE MODE (group/other writable) (/etc/cron.d/popularity-contest)
Jan 11 05:14:01 cron[1010]: (*system*anacron) INSECURE MODE (group/other writable) (/etc/cron.d/anacron)
Jan 11 05:15:01 cron[1010]: (*system*) INSECURE MODE (group/other writable) (/etc/crontab)
Jan 11 05:15:01 cron[1010]: (*system*php) INSECURE MODE (group/other writable) (/etc/cron.d/php)
Jan 11 05:15:01 cron[1010]: (*system*popularity-contest) INSECURE MODE (group/other writable) (/etc/cron.d/popularity-contest)
Jan 11 05:15:01 cron[1010]: (*system*anacron) INSECURE MODE (group/other writable) (/etc/cron.d/anacron)
Jan 11 05:16:01 cron[1010]: (*system*) INSECURE MODE (group/other writable) (/etc/crontab)
Jan 11 05:16:01 cron[1010]: (*system*php) INSECURE MODE (group/other writable) (/etc/cron.d/php)
Jan 11 05:16:01 cron[1010]: (*system*popularity-contest) INSECURE MODE (group/other writable) (/etc/cron.d/popularity-contest)
Jan 11 05:16:01 cron[1010]: (*system*anacron) INSECURE MODE (group/other writable) (/etc/cron.d/anacron)
tail /var/log/apache2/error.log:
[Thu Jan 11 04:35:23.340749 2018] [mpm_prefork:notice] [pid 10268] AH00169: caught SIGTERM, shutting down
[Thu Jan 11 04:35:24.482050 2018] [mpm_prefork:notice] [pid 10360] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Jan 11 04:35:24.482111 2018] [core:notice] [pid 10360] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jan 11 04:43:03.292713 2018] [mpm_prefork:notice] [pid 10360] AH00169: caught SIGTERM, shutting down
[Thu Jan 11 04:43:04.414858 2018] [mpm_prefork:notice] [pid 10544] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Jan 11 04:43:04.414931 2018] [core:notice] [pid 10544] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jan 11 04:51:51.009037 2018] [mpm_prefork:notice] [pid 10544] AH00169: caught SIGTERM, shutting down
[Thu Jan 11 04:51:52.116501 2018] [mpm_prefork:notice] [pid 28607] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Jan 11 04:51:52.116565 2018] [core:notice] [pid 28607] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jan 11 05:01:31.230528 2018] [mpm_prefork:notice] [pid 28607] AH00169: caught SIGTERM, shutting down
ls -l /etc/cron.d/:
total 12
-rwxrwxrwx 1 root root 244 Dec 29 2014 anacron
-rwxrwxrwx 1 root root 670 Mar 1 2016 php
-rwxrwxrwx 1 root root 190 Aug 27 17:44 popularity-contest
Я побежал это
sudo chmod -R 644 /etc/cron.d
================================================================================================================================================================================================================= got
~$ ls -l /etc/cron.d/
=============================
ls: cannot access '/etc/cron.d/php': Permission denied
ls: cannot access '/etc/cron.d/popularity-contest': Permission denied
ls: cannot access '/etc/cron.d/anacron': Permission denied
total 0
-????????? ? ? ? ? ? anacron
-????????? ? ? ? ? ? php
-????????? ? ? ? ? ? popularity-contest
Я выполнил это как предложено
~$ apache2ctl configtest
Я получил это из put
Apache2: Syntax error on line 216 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf-enabled/phpmyadmin.conf: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.
Вот ссылка на журнал ошибок
:~$ cat -n /etc/apache2/apache2.conf | grep 216
216 IncludeOptional conf-enabled/*.conf
$ chmod 755 /etc/cron.d && sudo chmod 644 /etc/cron.d/
chmod: changing permissions of '/etc/cron.d': Operation not permitted