backup/restore apache owned files

Version 1.361

Feature
Finished

create a list of apache owned files, and reset them as such after a backup is restored. Excessive checks for symbolic and hard links, and other trickery. This will be enabled by default, set to 1 internally. To disable it, set: backup_apache_files_list=0 in the directadmin.conf, and restart DA. This setting also applies to the restores, both backup and restores will work with the apache owned files if this is enabled (set to 1). The file in the backups will be stored in the path: backup/apache_owned_files.list The format is relative below the /home/user/domains directory, so if: /home/user/domains/domain.com/public_html/file.php is chowned to apache before the backup, the path in the apache_owned_files.list will look like: domain.com/public_html/file.php one entry per line. Although I went to great lengths to optimize this code as much as it can be optimized, all files and directories below the domains are checked during the backup. This will slow down the process. For restores, each line of the apache_owned files is checked for about 6 different things, ranging from file ownership, links in the path, hard links at the file, symbolic links, path syntax, etc.. These checks will also slow things down, but are required to maintain security. If you're not worried about security and mainly use apache owned files.. you can disable this option in the directadmin.conf file. Note that both the backup system and restore system need to be 1.36.1 or newer for this to work. The apache_owned_files.list is a config file, one entry per line, with the values U, UG or G after the file. This specifies if the ownership should be apache:user, apache:apache or user:apache when restored. If you notice any files that are not being chowned to apache as you were expecting, run the dataskq in debug mode level 100. Level 100 is where the errors for these checks are set at. ./dataskq d100

Interested to try DirectAdmin? Get a 30-day Free Trial!