Пользователь не видит каталог в /var/www, хотя каталог там есть

Решено!

Хорошо, из-за отсутствия ответов я поделюсь подробностями того, что я сделал, чтобы после перезагрузки получить запрос на вход в систему на tty7.

1 )Создан однострочный скрипт "change.login.tty" в ~/bin

2 )Создан служебный файл systemd, "change.login.tty.service" в /etc/systemd/system/

3 )Включен «change.login.tty.service»

$ systemctl enable change.login.tty.service

4 )Изменил /etc/systemd/logind.conf на #NAutoVTs=7 и #ReserveVT=6

5 )Запустить getty на tty7, (скорее всего не нужно)

$ systemctl enable getty@tty7

6 )Перезагрузитесь, войдите в систему по запросу на tty7 и наслаждайтесь.

~/bin/change.login.tty

#!/bin/bash
# This changes the login tty #
chvt 7

/etc/systemd/system/change.login.tty.service

[Unit]
Description=Change login tty number.

[Service]
Type=idle
ExecStart=/home/[user name]/bin/change.login.tty

[Install]
WantedBy=multi-user.target

/etc/systemd/logind.conf

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.

[Login]
#NAutoVTs=7
#ReserveVT=7
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=33%

Пожалуйста, исправьте ошибки или объясните более простые решения, опубликовав сообщение, а не просто голосуя против или указывая на ошибки.

У меня сработало, ваши результаты могут отличаться.

-2
05.10.2019, 17:05
1 ответ

ls: cannot access /var/www/webassets: No such file or directory

пользователь cpanelне имеет права чтения или выполнения на /var/www. проверьте разрешения, затем добавьте пользователя в соответствующую группу.

0
28.04.2021, 23:28

Теги

Похожие вопросы