<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Nejsem ubunťák, ale adresáře v adresáři /var/run vytváří systemd pomocí systemd-tmpfiles-setup, bylo by fajn překontrolovat, jestli tohle není nějak nakopnuté.</div><div>Definici adresáře který se má vytvořit pro ssh najdeš snad v /usr/lib/tmpfiles.d/sshd.conf a mělo by to vypadat nějak takhle:</div><div>d /var/run/sshd 0755 root root</div><div>Kdyžtak rtfm: <a href="http://manpages.ubuntu.com/manpages/bionic/man5/tmpfiles.d.5.html">http://manpages.ubuntu.com/manpages/bionic/man5/tmpfiles.d.5.html</a><br></div><div dir="ltr"><br clear="all"><div><div dir="ltr" class="gmail_signature"><b>Matěj Koudelka</b><div><div>+420 604 266 933</div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, 16 Jan 2019 at 08:01, Jiri Drozd <<a href="mailto:jiri.drozd@sde.cz">jiri.drozd@sde.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Ahoj,<br>
<br>
od vypadku viz subj. mi na VPSce odmita startovat SSH a SCREEN - oboje ma problem s chybejicim adresarem ve /var/run, jede to na ubuntu 16.04<br>
<br>
- sshd chybi /var/run/sshd a proto nenajede po restartu, musim rucne vytvorit /var/run/sshd a nastartovat sshd, nicmene po dalsim restartu adresar opet chybi a je nutno ho vytvorit znova<br>
<br>
---<br>
root@bgrserver:~# systemctl status sshd <br>
● ssh.service - OpenBSD Secure Shell server<br>
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: e<br>
Active: failed (Result: start-limit-hit) since Mon 2019-01-14 16:06:32 UTC<br>
Process: 376 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255)<br>
<br>
xxx@bgrserver:~$ sudo cat /var/log/syslog | grep ssh<br>
[sudo] password for xxx:<br>
Jan 14 16:06:14 bgrserver systemd-tmpfiles[86]: Failed to validate path /var/run/sshd: Too many levels of symbolic links<br>
Jan 14 16:06:31 bgrserver sshd[326]: Missing privilege separation directory: /var/run/sshd<br>
Jan 14 16:06:31 bgrserver systemd[1]: ssh.service: Control process exited, code=exited status=255<br>
Jan 14 16:06:31 bgrserver systemd[1]: ssh.service: Unit entered failed state.<br>
Jan 14 16:06:31 bgrserver systemd[1]: ssh.service: Failed with result 'exit-code'.<br>
Jan 14 16:06:31 bgrserver systemd[1]: ssh.service: Service hold-off time over, scheduling restart.<br>
---<br>
<br>
- screenu prozmenu chybi /var/run/screen a situace je stejna jako u sshd - po restartu je nutne rucne znova vytvorit a zmenit mod na 777, pak jede<br>
<br>
---<br>
xxx@bgrserver:~$ screen -S test<br>
Cannot make directory '/var/run/screen': Permission denied<br>
<br>
... screen nejede ...<br>
<br>
xxx@bgrserver:~$ sudo mkdir /var/run/screen<br>
[sudo] password for xxx:<br>
xxx@bgrserver:~$ screen -S test<br>
Directory '/var/run/screen' must have mode 777.<br>
xxx@bgrserver:~$ sudo chmod 777 /var/run/screen<br>
xxx@bgrserver:~$ screen -S test<br>
<br>
... ted screen funguje, co po rebootu? ...<br>
<br>
[detached from 7334.test]<br>
xxx@bgrserver:~$<br>
xxx@bgrserver:~$ sudo reboot<br>
packet_write_wait: Connection to 37.205.11.73 port 22: Broken pipe<br>
<br>
... ted je treba nahodit sshd pres VPSadmina, vytvorenim /var/run/sshd a restartem sshd, jinak connection refused ...<br>
<br>
jdrozd@jdrozd-MS-7592:~$ ssh <a href="mailto:xxx@srv.dread.cz" target="_blank">xxx@srv.dread.cz</a><br>
ssh: connect to host <a href="http://srv.dread.cz" rel="noreferrer" target="_blank">srv.dread.cz</a> port 22: Connection refused<br>
<br>
jdrozd@jdrozd-MS-7592:~$ ssh <a href="mailto:xxx@srv.dread.cz" target="_blank">xxx@srv.dread.cz</a><br>
Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 3.16.6-042stab134.43 x86_64)<br>
<br>
* Documentation: <a href="https://help.ubuntu.com" rel="noreferrer" target="_blank">https://help.ubuntu.com</a><br>
* Management: <a href="https://landscape.canonical.com" rel="noreferrer" target="_blank">https://landscape.canonical.com</a><br>
* Support: <a href="https://ubuntu.com/advantage" rel="noreferrer" target="_blank">https://ubuntu.com/advantage</a><br>
Last login: Wed Jan 16 06:10:45 2019<br>
xxx@bgrserver:~$ screen -S test<br>
Cannot make directory '/var/run/screen': Permission denied<br>
<br>
... po restartu je to o5 v ...<br>
<br>
---<br>
<br>
Pritom prava na /var/run potazmo /run kam se to symlinkuje jsou stejna jako na jine ubuntu 16.04 masine kde vse funguje.<br>
<br>
---<br>
xxx@bgrserver:~$ ll /var | grep run<br>
lrwxrwxrwx 1 root root 9 lis 15 2016 lock -> /run/lock/<br>
lrwxrwxrwx 1 root root 4 lis 15 2016 run -> /run/<br>
<br>
xxx@bgrserver:~$ ll / | grep run<br>
drwxr-xr-x 17 root root 560 led 16 06:11 run/<br>
---<br>
<br>
Nesetkal se nekdo z Vas s necim podobnym, nebo netusite kde by mohl byt problem?<br>
<br>
Poslal sem to i na podporu VPSfree, protoze si nejsem jisty jestli se jedna o problem na jejich strane, nebo se mi rozbilo Ubuntu (i kdyz k tomu nemelo duvod)...<br>
<br>
Diky - Buger<br>
_______________________________________________<br>
Community-list mailing list<br>
<a href="mailto:Community-list@lists.vpsfree.cz" target="_blank">Community-list@lists.vpsfree.cz</a><br>
<a href="http://lists.vpsfree.cz/listinfo/community-list" rel="noreferrer" target="_blank">http://lists.vpsfree.cz/listinfo/community-list</a><br>
</blockquote></div></div></div></div></div>