docker-compose.ymlの作成
smb.confの作成
主なコマンド
put
ls
dir
!ls client側を確認
clientからsambaサーバへの接続
host01@admin:~$ smbclient //192.168.1.1/shared -U myuser
Password for [WORKGROUP\myuser]:
Try "help" to get a list of possible commands.
smb: \>
smb: \>
smb: \> pwd
Current directory is \\192.168.1.1\shared\
smb: \>
smb: \> ls -ltr
NT_STATUS_NO_SUCH_FILE listing \-ltr
smb: \>
★shared接続直後は、shareフォルダがカレントディレ
★lsまたはdir
smb: \> ls
. D 0 Fri Dec 1 15:49:55 2023
.. D 0 Fri Dec 1 15:00:14 2023
knowledge_latest.ods N 3220449 Fri Dec 1 15:49:55 2023
backlog-service.pdf N 6903393 Fri Dec 1 15:28:22 2023
.~lock.knowledge_latest.ods# AH 81 Fri Dec 1 15:49:54 2023
490617784 blocks of size 1024. 271902840 blocks available
clientの/tmp/fileをsharedにコピー →エラー
sharedフォルダ内にも同じ名前の/tmpフォルダが必要らしい。ここの挙動が謎
smb: \> put /tmp/coreruleset-3.3.5
coreruleset-3.3.5/ coreruleset-3.3.5.tar.gz
smb: \> put /tmp/coreruleset-3.3.5.tar.gz
NT_STATUS_OBJECT_PATH_NOT_FOUND opening remote file \tmp\coreruleset-3.3.5.tar.gz
smb: \>
smb: \>
smb: \> ls
. D 0 Fri Dec 1 15:49:55 2023
.. D 0 Fri Dec 1 15:00:14 2023
knowledge_latest.ods N 3220449 Fri Dec 1 15:49:55 2023
backlog-service.pdf N 6903393 Fri Dec 1 15:28:22 2023
.~lock.knowledge_latest.ods# AH 81 Fri Dec 1 15:49:54 2023
490617784 blocks of size 1024. 271899556 blocks available
smb: \>
smb: \>
smb: \> put /home/host01/ダウンロード/mail.jpeg →同様にエラー
NT_STATUS_OBJECT_PATH_NOT_FOUND opening remote file \home\host01\ダウンロード\mail.jpeg
smb: \>
smb: \>
smb: \> dir
. D 0 Fri Dec 1 15:49:55 2023
.. D 0 Fri Dec 1 15:00:14 2023
knowledge_latest.ods N 3220449 Fri Dec 1 15:49:55 2023
backlog-service.pdf N 6903393 Fri Dec 1 15:28:22 2023
.~lock.knowledge_latest.ods# AH 81 Fri Dec 1 15:49:54 2023
490617784 blocks of size 1024. 271891404 blocks available
smb: \>
smb: \>
smb: \>
smb: \> !dir /tmp
Python-3.11.4 gdm3-config-err-Zpg7rk systemd-private-9143b6a75e8146bf91e989851752b500-systemd-logind.service-Y58HEg
Python-3.11.4.tgz snap-private-tmp systemd-private-9143b6a75e8146bf91e989851752b500-systemd-oomd.service-l6MaXz
Python-3.12.0 systemd-private-9143b6a75e8146bf91e989851752b500-ModemManager.service-tb3X58 systemd-private-9143b6a75e8146bf91e989851752b500-systemd-resolved.service-ACN7b6
Python-3.12.0.tgz systemd-private-9143b6a75e8146bf91e989851752b500-chrony.service-Em0HkX systemd-private-9143b6a75e8146bf91e989851752b500-upower.service-lvPLtl
coreruleset-3.3.4 systemd-private-9143b6a75e8146bf91e989851752b500-colord.service-MQ0wcv tracker-extract-3-files.1000
coreruleset-3.3.4.tar.gz systemd-private-9143b6a75e8146bf91e989851752b500-fwupd.service-pmfBGp tracker-extract-3-files.127
coreruleset-3.3.5 systemd-private-9143b6a75e8146bf91e989851752b500-power-profiles-daemon.service-VMLkk8 v3.3.4.tar.gz
coreruleset-3.3.5.tar.gz systemd-private-9143b6a75e8146bf91e989851752b500-switcheroo-control.service-3lz5Pp
smbサーバ側で、share/tmpディレを作成
再度clientの/tmp/fileをsharedにコピー
smb: \> put /tmp/coreruleset-3.3.4.tar.gz
putting file /tmp/coreruleset-3.3.4.tar.gz as \tmp\coreruleset-3.3.4
転送して配置に成功している。