# Samba on Termux — port 4450 (445 requires root) # # Replace YOUR_USER with the Samba user you created via `smbpasswd -a YOUR_USER`. # Replace HOST_NAME with whatever you want this device to advertise as. # Connect from clients with: \\:4450 or smb://:4450/ [global] workgroup = WORKGROUP server string = Termux Mobile netbios name = HOST_NAME # Non-privileged port smb ports = 4450 security = user map to guest = never passdb backend = tdbsam # SMB2/3 only — Windows 11 and modern Linux/macOS prefer these client min protocol = SMB2 server min protocol = SMB2 server max protocol = SMB3 client max protocol = SMB3 smb encrypt = desired server signing = desired client signing = desired # Termux paths (these MUST exist before smbd starts) private dir = /data/data/com.termux/files/home/.config/samba/private lock directory = /data/data/com.termux/files/home/.config/samba/lock state directory = /data/data/com.termux/files/home/.config/samba/state cache directory = /data/data/com.termux/files/home/.config/samba/cache pid directory = /data/data/com.termux/files/home/.config/samba log file = /data/data/com.termux/files/home/.config/samba/samba.log max log size = 500 log level = 1 socket options = TCP_NODELAY IPTOS_LOWDELAY use sendfile = yes aio read size = 16384 aio write size = 16384 unix charset = UTF-8 dos charset = CP850 server multi channel support = yes mdns name = mdns # Share: Android shared storage (DCIM, Downloads, etc.) [Storage] comment = Android shared storage path = /storage/emulated/0 browseable = yes writable = yes valid users = YOUR_USER create mask = 0644 directory mask = 0755 # Share: Termux $HOME (be careful, this exposes shell config too) [Termux] comment = Termux home path = /data/data/com.termux/files/home browseable = yes writable = yes valid users = YOUR_USER create mask = 0644 directory mask = 0755