---------------------------------------------------------------------------------------------- ReadMe (user documentation) file for scripts, which provide auto launching of the sm_file_send_clns and sm_file_send_srvs daemons on Debian-based Linux Distros: Debian, Ubuntu, Mint. --------------------------- This directory contains follow directories and files: - init.d/ sm_file_exchanger; - rcX.d/ sm_file_exchanger.service; - sm_file_exchanger.sh; . sm_file_exchanger sm_file_exchanger.sh --------------------------- File: - sm_file_exchanger - sm_file_exchanger.sh - the scripts, which allow to start/stop/restart the sm_file_send_clns and sm_file_send_srvs daemons, using the some defined user as owner of the daemon processes; this script can be used for the control of the sm_file_send_clns and sm_file_send_srvs daemons in the command line; Usage: sm_file_exchanger {start|stop|restart|status} sm_file_exchanger.sh {start|stop|restart|status} . The file sm_file_exchanger should be copied in the directory: /etc/init.d/ , also owner/group/attributes should be changed to root/root/rwxr-xr-- . Usage: sm_file_exchanger.sh {start|stop|restart|status} . User can define user name, who will be owner of processes sm_file_send_clns and sm_file_send_srvs after launch of the OS. If it's necessary, root can be defined as owner of processes sm_file_send_clns and sm_file_send_srvs. Also user can make some fix of sm_file_exchanger: su --session-command="$daemon_exec '--daemon' '--pidfile=$pid_file'" $FE_USER; #su --command "$daemon_exec '--daemon' '--pidfile=$pid_file'" $FE_USER; Some systems don't support 'su --session-command'. a user should use 'su --command' in such cases. $FE_HOME --------------------------- A user should define variable $FE_HOME in files: - sm_file_exchanger - sm_file_exchanger.sh . By default: FE_HOME="/opt/fe/file_exchanger-0.0.11.11-Linux-x64"; $FE_HOME should contain the Home Directory path of the File Exchanger (file_exchanger) Tool. FE_CLNS_USER; FE_SRVS_USER; --------------------------- A user should define variables $FE_CLNS_USER and $FE_SRVS_USER in files: - sm_file_exchanger - sm_file_exchanger.sh . By default: FE_CLNS_USER="root"; FE_SRVS_USER="sman"; $FE_CLNS_USER and $FE_SRVS_USER should contain User Name of user owner of the sm_file_send_clns and sm_file_send_srvs daemons. NOTE: If a user changes $FE_CLNS_USER and $FE_SRVS_USER values, and launches daemons with different permissions, he should care about access permissions to directories: /var/log/smansoft /var/lib/smansoft and all their subdirectories and files. I.e. daemons sm_file_send_clns and sm_file_send_srvs should have access to these directories and files before their launch. It's recommended to use: FE_CLNS_USER="root" and FE_SRVS_USER="sman" , i.e. FE_SRVS_USER is a some non-root user. In this case (if FE_CLNS_USER=="root") client daemon can read and send files with any permissions from "client out" directory and user don't need to care about permissions of files, copied into client out directory. The server daemon opens server socket connection. And more secure solution - usage of non-root user for launching of the server daemon. In this case the server daemon will create files owned by user defined by FE_SRVS_USER. sm_file_exchanger.links.tar.gz --------------------------- File: - sm_file_exchanger.links.tar.gz - contains links to ../init.d/sm_file_exchanger: K02sm_file_exchanger S02sm_file_exchanger . these files/links should be unpacked from the archive and they should be copied to /etc/rcX.d/ directories if a user have copied the sm_file_exchanger script to /etc/init.d directory. ----------------------------------------------------------------------------------------------- End of the document ----------------- Copyright (C) 2020 SManSoft Sergey Manoylo