Category Archives: sadmin

sadmin

Спиране на всички логове (access , error) на apache и nginx

find /etc/apache2/sites-enabled/* -exec sed -i 's/#*[Cc]ustom[Ll]og/#CustomLog/g' {} \;
find /etc/apache2/sites-enabled/* -exec sed -i 's/#*[Ee]rror[Ll]og/#ErrorLog/g' {} \;

find /etc/nginx/sites-enabled/* -exec sed -i 's/#*access_log/#access_log/g' {} \;
find /etc/nginx/sites-enabled/* -exec sed -i 's/#*error_log/#error_log/g' {} \;

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Debian Failed to fully start up daemon: Input/output error

dmesg грешка

[61408197.314934] systemd-logind[11073]: Failed to enable subscription: Launch helper exited with unknown return code 1
[61408197.317593] systemd-logind[11073]: Failed to fully start up daemon: Input/output error
[61408495.892682] systemd-logind[14386]: Failed to enable subscription: Launch helper exited with unknown return code 1
[61408495.895484] systemd-logind[14386]: Failed to fully start up daemon: Input/output error
[61408797.441160] systemd-logind[18168]: Failed to enable subscription: Launch helper exited with unknown return code 1
[61408797.444052] systemd-logind[18168]: Failed to fully start up daemon: Input/output error
[61408915.209397] systemd-logind[19324]: Failed to enable subscription: Launch helper exited with unknown return code 1
[61408915.212378] systemd-logind[19324]: Failed to fully start up daemon: Input/output error

Fix: apt-get install systemd-shim

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Грешка на Symfony3 The server returned a “500 Internal Server Error”

При човъркане на един Symfony3 проект излезе тая грешка, но ето го и супер сложния фикс :)

root:/var/www/public_html# php bin/console cache:clear --env=prod

// Clearing the cache for the prod environment with debug false

[OK] Cache for the "prod" environment (debug=false) was successfully cleared.

screenshot_2020-02-10-an-error-occurred-internal-server-error

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

AnyDesk (Безплатна алтернатива на Team viewer)

Понеже team viewer постоянно ме изхвърля с текст, че го ползвам за комерсиални цели(което си е вярно :) ) затова се наложи употребата на друго приложение, в случая "AnyDesk".

Може да се изтегли напълно безплатно от техният сайт: https://anydesk.com/en
Има го за повечето системи, разбира се.

Когато го изтеглих и стартирах ми върна следната грешка:

@ ~/Downloads/anydesk-5.1.1 $ ./anydesk
./anydesk: error while loading shared libraries: libgtkglext-x11-1.0.so.0: cannot open shared object file: No such file or directory
Просто си иска: apt-get install libgtkglext1

това е :)
ето и как изглежда.
anydesk-alternativa-na-teamviewer
Изключително бързо и най- вече безпроблено :)

Благодарности на Алекс ;)

PS: Има начини teamviewer да се лъже и да се ползва като за първи път, но не ми се занимава с това вече :) Има решение и то е AnyDesk :)

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Linux Chrome и ssh тунел

Когато ползвам Хром ми извежда следното съобщение:
chrome://linux-proxy-config/

When running Google Chrome under a supported desktop environment, the system proxy settings will be used. However, either your system is not supported or there was a problem launching your system configuration.

But you can still configure via the command line. Please see man google-chrome-stable for more information on flags and environment variables.

За целта към Хром(app run) се добавя следния аргумент: --proxy-server="socks5://localhost:1080"

или

/usr/bin/google-chrome-stable -disk-cache-dir="/tmp/" -disk-cache-size=600000000 --password-store=basic --proxy-server="socks5://localhost:1080"

Тук е инфо за създаването на проксито: ПРЕНАСОЧВАНЕ НА ПОРТ ПРЕЗ SSH

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Изпращане на мейл през smtp, чрез nc /netcat/

FILE: 1.txt

EHLO mail.server.com
MAIL FROM:
RCPT TO:
DATA
Date: Fri, 12 Aug 2019 06:27:07 +0000
To: [email protected]
From: Wormly SMTP Test
Subject: Wormly SMTP Test Message

This message was sent using the Wormly SMTP testing tool by this user:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
78.142.24.29

.
QUIT

netcat -C mail.server.com 25

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Премахване на cronjob на друг потребител

Гледам в syslog някакъв крон се изпълнява, но файла го няма т.е. само ми пълни лога.
Идеята е да го махна като не си го маха потребителя…

crontab -e -u USER

Това е :) Лесно е, но ако тази публикация е помогнала на един ще си е от полза писането :)

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Opencart и vqmod проблем след php upgrade

Ето я и грешката:

Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in vqmod/vqmod.php on line 252Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback inste

След обновяване на php и се получи тая грешка на един opencart.

За да се фиксне е необходимо да се обнови vqmod

wget 'https://github.com/vqmod/vqmod/archive/opencart.zip'
слага се в root след това site/vqmod/install . излиза съобщение, че vqmod upgrade или нещо такова.

Това е :)

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)