snacのユーザーごとのstaticディレクトリ

snac susie

snacのための静的ディレクトリをapache2 httpd で設定してカスタム絵文字の設置場所に利用しています.

実は設定せずともユーザごとに静的ディレクトリがあるのに気づきました.

きっかけはこちら.

${SNAC-URL}/${USER}/s/ の下が使えるようです.
実際に試してみます.

$ cd ${SNAC-DATA}/user/${USER}/static <.>
$ echo test > test <.>
$ w3m -dump_extra https://snac.matoken.org/matoken/s/test | grep ^HTTP/ -A99 <.>
HTTP/1.1 200 OK
Date: Wed, 18 Feb 2026 20:50:37 GMT
Server: Apache/2.4.66 (Debian)
content-type: application/octet-stream
x-creator: snac/2.90
etag: W/”snac-1771444525″
access-control-allow-origin: *
access-control-allow-headers: *
access-control-expose-headers: Link
Content-Security-Policy: script-src ;
content-length: 5
Connection: close

test

  1. ユーザーディレクトリの下の static に移動

  2. テストファイルを作成

  3. ユーザーディレクトリの下の s 以下の該当ファイルを確認

ということでsnac server の ${SNAC-DATA}/user/${USER}/static 以下に置いたファイルが ${SNAC-URL}/${USER}/s/ 以下で確認できます.
theme でこのディレクトリは利用していましたが,theme 以外のファイルもok なんですね.

環境
$ sudo -u snac ~snac/snac2/snac state ~snac/snac-data
server: snac.matoken.org (snac/2.90)
uptime: 1:11:46:03
job fifo size (cur): 0
job fifo size (peak): 11
thread #0 state: waiting
thread #1 state: waiting
thread #2 state: waiting
thread #3 state: waiting
$ lsb_release -dr
No LSB modules are available.
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
$ arch
x86_64

Reposts

コメントを残す

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.