新たにウェブサーバーを立ち上げたところ ユーザーディレクトリー http://localhost/~user/ が 403 Forbidden になった… / User directory http://localhost/~user/ got 403 Forbidden…

/home/user のパーミッションを確認

環境

今まで通りにやったのに

Roundcube webmail サーバーその他を設定した時のメモ, 8 Sep 2019

Roundcube webmail サーバーを設定した時のメモ, 23 Nov 2017

 

FastCopy

下記のように実行すると

srcDir の中身が dstDir の中に差分コピーされる

詳しい解説:
https://fastcopy.jp/help/fastcopy.htm

Syncthing and ssh portforwarding

環境

下記を参考にインストールしました:

https://qiita.com/MasanoriIwakura/items/555f3bc0f4f322c63cdf

準備

同期対象のファイルが多いと下記のエラーが起きるので事前に対応しておく

以下のフォルダへの変更の監視を始めるにあたってエラーが発生しました。
1分ごとに再試行するため、すぐに回復するかもしれません。
エラーが続くようであれば、原因に対処するか、必要に応じて助けを求めましょう。  サポート
data failed to setup inotify handler. Please increase inotify limits, see https://docs.syncthing.net/users/faq.html#inotify-limits

  • 自動再起動の設定
  • lsync を使用するので監視可能なファイル数を増やす設定

5 は再起動までの秒数 (1 – 60, 0: 再起動しない)

設定の反映

設定の確認

Install

下記を参考に stable インストールしました
そのままです:

https://apt.syncthing.net/

To allow the system to check the packages authenticity, you need to provide the release key.

# Add the release PGP keys:
sudo curl -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg

The stable channel is updated with stable release builds, usually every first Tuesday of the month.

# Add the “stable” channel to your APT sources:
echo “deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable” | sudo tee /etc/apt/sources.list.d/syncthing.list

The candidate channel is updated with release candidate builds, usually every second Tuesday of the month. These predate the corresponding stable builds by about three weeks.

# Add the “candidate” channel to your APT sources:
echo “deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing candidate” | sudo tee /etc/apt/sources.list.d/syncthing.list

And finally.

# Update and install syncthing:
sudo apt-get update
sudo apt-get install syncthing

実行

ブラウザが立ち上がります
http://127.0.0.1:8384

GUI認証: ユーザー名とパスワードを設定

メニュー > 設定 > GUI

接続先デバイスとフォルダの追加

ファイルのバージョン管理を期間別設定してみました

Service 設定

ssh portforwarding

Syncthing の利用では常時電源の入っているPCが無いと都合が悪いので
モニターもキーボードも接続されていないPCにもインストールしたのですが
設定をするのに Syncthing の httpポートに接続できないとしんどいので

Syncthing サーバー ここでは 192.168.11.105
の http ポート 8384 をローカールの 8000 へ転送

ssh の認証が password の場合

それ以外で必要になりそうなオプション

これで下記で接続、設定できるようになった
http://localhost:8000/

中継サーバーを介する ssh portforwarding の例

行う度に思い出せない…

転送元 -> 中継 リバース接続

http.example.com:80 -> relay.example.com:44000

ローカル -> 中継

127.0.0.1:8000 -> relay.example.com:44000

grepによる検索が終わらない / Search by grep never ends

grep で検索を行った際に、バイナリーファイルだから駄目〜と叱られたり(テキストなのに -a も通用しないぜ)、ファイルが終端まで達したのに shell のプロンプトへ戻ってこないということが起こった。
ありがとう iconv.

nkf -w8 -Lu ではうまく行かなかった。なぜ?

EPSON PX-1004 on Ubuntu 22.04.1 LTS

下記からドライバーをダウンロード:
http://download.ebz.epson.net/dsc/search/01/search/searchModule

こんな感じで印刷できるようになった。