Purpose: Full record of everything done across this multi-session effort, kept so a future clone rebuild doesn't have to rediscover any of it. Nothing intentionally omitted.
--transcribe flag for Whisper (separate cron entries).Contains:
media_index_checkpoint.json, media_store.json)--transcribe flagKnown stubs requiring real wiring before use:
resolve_attachment_dir() raises NotImplementedError β needs a real _parse_php_dir_array()-equivalent from PDFsearch.py/MiscIndexer.py.pip3 install torch==1.4.0 --no-deps succeeds on Live.python3 -c "import torch" fails: ImportError: /lib64/libc.so.6: version 'GLIBC_2.14' not found.uname -r), predates Docker's 3.10 kernel requirement entirely.media_store.json, copied to Live. Live only ever does plain numpy cosine-similarity math, no torch.CentOS-6.10-x86_64-minimal.iso (406M) from https://vault.centos.org/6.10/isos/x86_64/CentOS-6.10-x86_64-minimal.iso (CentOS 6 is EOL, pulled from vault not main mirrors).128.199.200.202.AllowUsers in /etc/ssh/sshd_config restricts root SSH login to: 101.*, 120.1*, 120.2*, 128.199.200.202, localhost β legitimate Live-side security control.--info=progress2 unsupported; use --progress instead.--numeric-ids needed since Live/Clone service-account UIDs may differ despite same usernames./dev,/proc,/sys,/tmp,/run,/mnt,/media,/lost+found,/swapfile,
/var/lib/mysql,/root/.cache,/var/lib/clamav,/var/lib/awstats,
/var/spool/mail,/opt/metasploit-framework/.git,/usr/src/tensorflow/.git,
/var/www/html/private,/var/www/html/ISE_Data,/var/www/html/backup,
/SQL,/var/log/httpd,/etc/webmin/system-status/history,/var/lib/fail2ban,
/usr/local/lib/python3.6/site-packages/torch/lib
Plus: full SMF+DB but only last 20 attachments β /var/www/html/attachments and /attachments2 excluded wholesale from the main rsync, with a separate find ... -printf '%T@ %p\n' | sort -rn | head -20 step to pull just the 20 newest attachment files.
mysqldump (--all-databases --single-transaction --quick) must run ON LIVE, then scp'd to Clone; Clone needs mysql-server installed separately to import.
/).rsync - aAv (space typo after dash) causing "Unexpected remote arg" errors.--exclude additions (/etc/*, /bin/*) flagged as dangerous for future reuse β reverted to narrower excludes at the time (later, this session, /etc/* was reintroduced deliberately β see Part 2)./etc/hosts onto Clone, containing lines mapping forum.drugs-and-users.org β ::1 and 127.0.0.1 (matched before the real IP line)./var/log/secure (found rhost=::1, hostname "forum" β the loopback smoking gun).sed -i '/forum.drugs-and-users.org/d' /etc/hosts on Clone, or bypassing with direct IP.-X (extended attributes/SELinux) flag produces harmless lremovexattr ... Permission denied warnings on LiveβClone rsync β safe to ignore or drop -X.--numeric-ids explained: copies UID/GID as raw numbers, not name-mapped..bashrc/clone.sh looked "lost": not deleted β /root was never excluded, so Live's copy of /root overwrote Clone's freshly-made files (same-path overwrite, not deletion). Lesson: anything worth keeping on Clone must be written AFTER rsync completes, or /root must be excluded (later done: --exclude="/root/*").df -h showed /dev/vda1 60G, 28G used β Live's disk is virtio-backed, i.e. Live itself likely runs as a VM on KVM/QEMU)./home/claude/generate_mock_media_store.py, 512-dim normalized (unit-length) vectors matching real CLIP ViT-B-32 output shape.transcript: None simulating CLIP-indexed-but-not-yet-transcribed./mnt/user-data/outputs/media_store_mock.json β this session, re-delivered again after being requested a second time (see Part 2, Β§2.1).pip install torch --index-url https://download.pytorch.org/whl/cpu --break-system-packages β FAILED ("No matching distribution found for torch") at the time.media_store_mock.json again, explicitly caveated as fake/synthetic data, not connected to real images.IMG_20151007_142325.jpg, IMG_20150901_130718.jpg, IMG_20150828_101258.jpg, 0626151720.jpg, _1_dope_pic.jpg β landed in /mnt/user-data/uploads/.instagram-1787449936704.mp4./home/claude/real_index.py to embed these with real CLIP (open_clip ViT-B-32) + ffmpeg keyframe extraction for the video.huggingface.co (x-deny-reason: host_not_allowed, HTTP 403) AND openaipublic.azureedge.net (same deny reason) β both are the two places open_clip tries to pull pretrained weights from. torch/open_clip themselves installed fine (PyPI is allowed); only the actual weight download is blocked.ViT-B-32.pt weight file directly, (3) user's network settings could potentially allow-list huggingface.co.The_ISE_Project_v9_0.zip (full real bundle, containing RankingEngine.py, MediaSearch.py, etc.)RankingEngine.py rule interface (Rule.score(result, ctx) -> (points, explanation)).SimilarityRule: reads result['similarity'] (0.0β1.0 cosine similarity, precomputed by MediaSearch.py), scales to round(similarity * 150) points β deliberately above QueryMatchRule's single-exact-word range, since for media results similarity IS the entire relevance signal.MEDIA_RULES list: [SimilarityRule(), BoardWeightRule(), RecencyRule(), PenaltyRule()] β deliberately EXCLUDES QueryMatchRule/LocationRule/OccurrenceRule/ProximityRule/ConsecutiveTermsRule (text-only rules). Specifically called out: LocationRule always adds +20 as a "matched in reply body" fallback when nothing else matched β nonsensical for a media result with no body text.RankingEngine.score_media() / rank_media() convenience methods β build a minimal dummy QueryContext internally since media similarity comes precomputed, not tokenized.media_ranking_engine() factory function.rank_media() β confirmed correct ordering, correct recency scaling, correct board penalties (Recycle Bin: -25, Archive: -10).(attachment_id, score, entry) tuples with no RankingEngine integration.search() now merges attachment_id and similarity onto each result dict, then by default hands the list to media_ranking_engine().rank_media() β matching how ISE/ISEpdf/ISEmisc already flow through RankingEngine.use_ranking_engine=False option retained for bare similarity-sorted testing without importing RankingEngine.format_results() updated for new dict shape β shows both similarity % and final ise_score.search() using one of the mock store's own real vectors as the query β confirmed 100% self-match scored 150/150 (max), correct fall-off ranking for everything else./mnt/user-data/outputs/RankingEngine.py, /mnt/user-data/outputs/MediaSearch.py.$SQL_FILE variable syntax= in bash: SQL_FILE="/root/live_full_backup_2026-08-24.sql".export needed if the variable must persist beyond one script.hostnamectl: command not foundhostname Clone (immediate, session-only) plus editing /etc/sysconfig/network's HOSTNAME= line (persists across reboot).\h) not updating immediately after hostname Clone β expected; bash caches $HOSTNAME at shell startup. Fix: exec bash or reopen the session./etc/hosts loopback trap recurred on THIS clone too::1 forum forum.drugs-and-users.org localhost.drugs-and-users.org localhost
127.0.0.1 forum forum.drugs-and-users.org localhost.drugs-and-users.org localhost
128.199.200.202 forum forum.drugs-and-users.org drugs-and-users.org localhost.drugs-and-users.org localhost
sed -i '/forum.drugs-and-users.org/d' /etc/hosts
echo "127.0.0.1 Clone localhost" >> /etc/hosts
-X vs -x in rsync-X = --xattrs (extended attributes/SELinux) β the source of lremovexattr ... Permission denied noise.-x (lowercase) = --one-file-system β entirely different, stops crossing mount boundaries.Disabled, Clone had it Enforcing β mismatched security context caused every -X copy attempt to fail.setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
-X also dropped from the rsync command afterward (nothing to preserve).-P/--partial--partial, a killed mid-transfer file gets deleted on the receiving end rather than resumable β explains why the phone dying mid-rsync caused what looked like a full restart (only the in-flight file was actually lost, not the whole transfer, assuming no clock-mismatch).screen/tmux/nohup so a dropped SSH session doesn't kill the transfer.rsync -zpaAPve -ssh malformed-e needs its own space-separated argument. Bundled as -zpaAPve -ssh, rsync read -ssh (with the dash) as the remote-shell command, which doesn't exist.-e ssh (separate flag).clone1.sh)#015 appearing in an rsync error (link_stat "/root/0015") β #015 is the octal escape for \r (carriage return), proof of CRLF.set -e throwing a usage error, every --exclude=... line running as its own bogus "command not found" (because line-continuation backslashes were followed by \r not \n), and the mangled rsync destination path.sed -i 's/\r$//' clone1.sh β strip trailing \r from every line..sh files in Notepad; if a file crosses the WindowsβLinux boundary, always run the sed fix before executing./boot never being excluded from the rsync, meaning Clone's own kernel/initrd/GRUB config got overwritten with Live's, which references a different disk/UUID setup entirely.--exclude="/boot/*" added./boot exclude theory was worth checking; by this point, the corrected script (with /boot excluded) was already what had been used, so a NEW root cause needed identifying β turned out to be a chain of other never-excluded /etc files, discovered one at a time (see below)./boot gap existed in every version of clone.sh from the start of that session, not something introduced fresh; by the time of the second death, several OTHER /etc gaps were the live culprits.LABEL=DOROOT boot failure (second dead clone's actual symptom)DOROOT./etc/fstab was never excluded β Clone inherited Live's fstab, which references Live's own disk label (DOROOT), not whatever label Clone's actual disk carries.blkid to check the real label, then either:
e2label /dev/sda1 DOROOT (make disk match fstab), ORLABEL=DOROOT, not a typo) β purely a label MISMATCH, not a syntax bug.AllowUsers (from Live's copied sshd_config) or fail2ban ban state β both real candidates, correctly identified as plausible given tonight's pattern, but user indicated "it's not that, I think" without a definitive resolution being confirmed via transcript before moving to the next issue./etc/hosts re-checked around this point too β showed only local/loopback entries at the point asked (127.0.0.1, ::1, "all the local hosts") β appeared already fixed by then./etc/passwd//etc/shadow leak suspected β likely THE actual SSH lockout cause/etc/shadow overwrote Clone's, Clone would authenticate against Live's root password hash, not whatever password the user had been setting/typing for Clone β a much better fit for "logged off, can't log back in via SSH, but console/root still works" than a firewall block.passwd root from console (bypasses needing SSH), plus add /etc/passwd, /etc/shadow, /etc/group to the standing exclude list./etc/sysconfig/network-scripts leakifcfg-eth0 with Live's, including possibly losing the 192.168.233.134 static IP the user had set by hand earlier in the session.ifcfg-eth0 to be built but the exact target IP/interface name was never confirmed before the conversation moved on to other fires (fail2ban, iptables) β this remains an open/unconfirmed item if a real ifcfg-eth0 file is still needed.service fail2ban stop + chkconfig fail2ban off.chkconfig --list fail2ban output: 0:off 1:off 2:off 3:off 4:off 5:off 6:off β fully disabled./etc/sysconfig/iptables leak suspectediptables -F; iptables -X + reset default policies to ACCEPT + service iptables save./etc/ssh/sshd_config leakAllowUsers restriction (whitelisting specific source IPs, none of which would be the user's actual current connecting IP from Clone's perspective) likely compounded the SSH lockout./etc excluded wholesale/etc-rooted leaks discovered one at a time (hosts, fstab, passwd/shadow, network-scripts, iptables, sshd_config, plus the earlier /boot non-/etc issue), the whack-a-mole approach was explicitly abandoned in favor of excluding all of /etc by default, with only specific known-needed app-config files (httpd vhosts, php.ini, my.cnf) to be pulled back deliberately and reviewed by hand.clone.sh rebuilt with --exclude="/etc/*" plus a [3b/5] manual-review reminder block (not auto-run) for the specific files that ARE safe/needed.my.cnf also never excluded β user asked directly "dont tell me u copied over my.cnf" β confirmed yes, same category of gap.Access denied for user 'root'@'localhost' errors in /var/log/mysqld.log, including one oddity: a login attempt as 'UNKNOWN_MYSQL_USER' (MySQL's literal placeholder for a nonexistent account attempting auth β noted as worth checking later, not resolved this session, possibly a stale app connection attempt using old credentials).5.7.44 (via mysql client Ver 14.14 prefix, clarified this isn't the server version itself)./mnt/user-data/outputs/reset_mysql_root.sh β stops mysqld, starts in --skip-grant-tables --skip-networking safe mode, runs ALTER USER 'root'@'localhost' IDENTIFIED BY '<password>', restarts normally. User must edit the placeholder password (ChangeMe123!) before running.ALTER USER syntax specific to MySQL 5.7, not older SET PASSWORD).pv installyum install epel-release (may need the archived Fedora Project vault URL directly since CentOS 6 is EOL and mirrors are gone: rpm -Uvh https://archives.fedoraproject.org/pub/archive/epel/6/x86_64/epel-release-6-8.noarch.rpm), then yum install pv.mysqld autostartchkconfig mysqld on β confirmed working via chkconfig --list mysqld showing 2:on 3:on 4:on 5:on (0/1/6 correctly off).E:\VMware\VMs\forum-glibc-clone) to a sibling folder (`E:\VMware\VMs-pre-glibc-upgrade`) as a full backup..vmx in VMware.Given Clone was by now already up and working (the scripts below are for the NEXT rebuild, not this Clone):
A) /mnt/user-data/outputs/clone.sh β /etc and /boot excluded wholesale, PLUS a new [6/6] section that actively APPLIES the concrete fixes discovered tonight rather than just describing them:
Clone (both hostname command and /etc/sysconfig/network's HOSTNAME= line)./etc/hosts clean (no self-mapping to the forum domain).blkid against fstab's expected DOROOT, advises e2label fix if mismatched.ifcfg-eth0 (must be chosen fresh, not inherited), and sshd's AllowUsers (must list the user's actual connecting IP, not Live's whitelist).B) /mnt/user-data/outputs/clone_include_etc.sh β alternative approach: pulls /etc almost entirely (httpd vhosts, php.ini, my.cnf, cron, logrotate, etc. all included), and ONLY excludes the seven specific files/dirs that caused actual damage:
/etc/hosts
/etc/fstab
/etc/passwd
/etc/shadow
/etc/group
/etc/gshadow
/etc/hostname
/etc/sysconfig/network
/etc/sysconfig/network-scripts/*
/etc/sysconfig/iptables*
/etc/ssh/sshd_config
/boot still excluded separately (unrelated to /etc, its own dead-VM cause). Caveat baked into the script's own closing output: my.cnf IS included in this version (not one of the "unrecoverable damage" complaints, just an annoying auth mismatch) β so the same MySQL password confusion could recur if this version is used, unlike version A where all of /etc including my.cnf is excluded.
Files/dirs that MUST NOT be blindly copied from Live to a freshly-installed Clone (identity/boot/account/network specific):
/etc/hosts β self-resolution loopback trap (hit TWICE, two different sessions)/boot/* β kernel/initrd/GRUB referencing wrong disk/UUID (killed 2 VMs)/etc/fstab β disk LABEL mismatch (killed 1 VM, recovered via e2label/manual fix)/etc/passwd, /etc/shadow, /etc/group β root password/account mismatch, causes SSH lockout even with correct-looking password/etc/sysconfig/network, /etc/sysconfig/network-scripts/* β hostname + static IP get overwritten/etc/sysconfig/iptables* β firewall rules/bans transplanted from Live/etc/ssh/sshd_config β Live's AllowUsers IP whitelist doesn't include Clone's actual connecting IPs/etc/my.cnf β can carry Live-specific bind-address/datadir, causes MySQL auth confusion/root/* β anything written here before the FIRST rsync run gets silently overwritten (same-path overwrite, not deletion) unless excluded or written AFTER rsync completes/swapfile β meaningless to copy; must be regenerated fresh, sized to Clone's own RAMMechanical gotchas:
128.199.200.202), never the hostname, from Clone.rsync -e ssh β -e needs its own space-separated argument; never bundle it into a combined flag string.-X/--xattrs will spam permission-denied errors if SELinux state differs between Live and Clone (Live: disabled, Clone default: enforcing) β either match SELinux states or drop -X entirely.--partial/-P is required for any interruptible/resumable transfer β without it, a killed mid-file transfer is lost, not resumed.sed -i 's/\r$//' scriptname.sh. Diagnostic tell: literal #015 appearing in error output.chkconfig (not systemctl) is the correct tool on CentOS 6 for autostart β hostnamectl doesn't exist either, use hostname + edit /etc/sysconfig/network.service fail2ban stop && chkconfig fail2ban off.ISEmedia code state (independent of the Clone VM issues):
MediaIndexer.py v0.1 β has 2 unresolved stubs, needs real attachment DB/dir layout to finish (a real forum post with a real attachment ID, once created, would supply this).MediaSearch.py v0.2 β complete and tested against mock data; wired into RankingEngine.RankingEngine.py v9.0 β SimilarityRule/MEDIA_RULES/rank_media() added and tested against mock/synthetic data.MediaIndexer.py's stubs against real data.Still pending (unchanged from prior session, not touched this session):
MediaIndexer.py's two stubs to real attachment layout.