#Check scheduling. code: crontab -l #Configure the schedule for the current user. code: crontab -e #Configure the schedule for the root user. #Recommended. code: sudo crontab -u root -e #Check scheduling for root. code: sudo crontab -u root -l #Check date. code: date #Check logs. code: sudo cat /var/log/syslog | grep CRON #Example. Reboot at 3.30 every day. # >> appends an already present file or creates a new file. # > overwrites an already present file or creates a new file. # /dev/cron_logfile - path. # 2>&1 redirects the stderr to the stdout. # /sbin holds commands needed to boot the system, # but which are usually not executed by normal users. code: 30 3 * * * /sbin/shutdown -h -r now > /dev/cron_logfile 2>&1 #Example. Restart the service at 12.30 every day. code: 30 12 * * * /bin/systemctl restart haspd > /dev/restart_hasp_log 2>&1
For Windows 1. Run setup.exe or go to Control Panel -> Programs and Features and configure the configuration repository server, then select installation as the process. 3. Create a directory for the repository. 2. Run the script (.bat file) as administrator: rem Script .bat set V8=<Path to bin directory 1C:Enterprise> "%V8%\crserver.exe" -instsrvc -usr .\<Name of the user> -pwd <Password of the user> -port <port> -d <path to directory of the repository> "%V8%\crserver.exe" -start pause ########################################################################################### rem Example: set V8=C:\Program Files\1cv8\8.3.24.1761\bin "%V8%\crserver.exe" -instsrvc -usr .\USR1CV8 -pwd 123456 -port 1340 -d D:\1C\Conf_rep\base_0 "%V8%\crserver.exe" -start pause
mysql --host=localhost --user=myname --password=password mydb mysql -h localhost -u myname -ppassword mydb # Example: mysql --host=localhost --user=myname --password mydb mysql -h localhost -u myname -p mydb # For exit: exit ################################################### # If you use --password or -p but do not specify a password value, the client program prompts you to enter the password. The password is not displayed as you enter it. This is more secure than giving the password on the command line. # Source: https://dev.mysql.com/doc/refman/8.4/en/connecting.html # If you need to edit a user ALTER USER '<user>'@'<host>' IDENTIFIED WITH mysql_native_password BY '<my_pasword>'; # Example: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123';
Binary Octal String Permission ------------------------------------------------- 000 | 0(0+0+0) | --- | No permission ------------------------------------------------- 001 | 1(0+0+1) | --x | Execute ------------------------------------------------- 010 | 2(0+2+0) | -w- | Write ------------------------------------------------- 011 | 3(0+2+1) | -wx | Write + execute ------------------------------------------------- 100 | 4(4+0+0) | r-- | Read ------------------------------------------------- 101 | 5(4+0+1) | r-x | Read + execute ------------------------------------------------- 110 | 6(4+2+0) | rw- | Read + write ------------------------------------------------- 111 | 7(4+2+1) | rwx | Read + Write + Execute ------------------------------------------------- Permissions in Linux are represented by three sets of numbers or letters, each corresponding to a different user or group. This hierarchical permission system is a core component of Linux security, allowing fine-grained control over file and directory access. The three sets are: * User (u): The owner of the file or directory. This is typically the person who created the file, though ownership can be transferred. * Group (g): A collection of users who share the same permission level for the file or directory. Groups help manage permissions for multiple users efficiently. * Others (o): Everyone else who has access to the system but is neither the owner nor in the assigned group. For each of these categories, Linux defines three basic permission types: * Read (r or 4): Allows viewing file contents or listing directory contents * Write (w or 2): Allows modifying file contents or creating/deleting files within a directory * Execute (x or 1): Allows running a file as a program or accessing a directory * - for no permission The first character indicates the file type (e.g., - for a regular file, d for a directory, l for a symbolic link, etc.). ####################### Example: 0123456789 drwxrwx--- (A directory that is modifiable (including its contents) by its owner and group) 1 "d" if a directory, "-" if a normal file 2, 3, 4 read, write, execute permission for user (owner) of file 5, 6, 7 read, write, execute permission for group 8, 9, 10 read, write, execute permission for other (world) ####################### To set permissions in Linux, you use the chmod command. chmod [OPTION]... MODE[,MODE]... FILE... chmod [OPTION]... OCTAL-MODE FILE... chmod [OPTION]... --reference=RFILE FILE... Options -c, --changes Like --verbose, but gives verbose output only when a change is made. -f, --silent, --quiet Quiet mode; suppress most error messages. -v, --verbose Verbose mode; output a diagnostic message for every file processed. --no-preserve-root Do not treat '/' (the root directory) in any special way, which is the default setting. --preserve-root Do not operate recursively on '/'. --reference=RFILE Set permissions to match those of file RFILE, ignoring any specified MODE. -R, --recursive Change files and directories recursively. --help Display a help message and exit. --version Output version information and exit. Examples: chmod -R 755 myfiles Recursively (-R) Change the permissions of the directory myfiles, and all folders and files it contains, to mode 755. User can read, write, and execute; group members and other users can read and execute, but cannot write. chmod u=rw example.jpg Change the permissions for the owner of example.jpg so that the owner may read and write the file. Do not change the permissions for the group, or for others. Sources: https://www.digitalocean.com/community/tutorials/how-to-set-permissions-linux https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-permissions https://www.computerhope.com/unix/uchmod.htm