mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	feature: ignore web server log files ownership in validate (#6943)
This commit is contained in:
		
				
					committed by
					
						
						Neil Lathwood
					
				
			
			
				
	
			
			
			
						parent
						
							afcc2b5e2d
						
					
				
				
					commit
					74e6c3edf5
				
			@@ -143,8 +143,11 @@ if (isset($config['user'])) {
 | 
			
		||||
    $find_result = rtrim(`find $tmp_dir \! -user $tmp_user`);
 | 
			
		||||
    if (!empty($find_result)) {
 | 
			
		||||
        // This isn't just the log directory, let's print the list to the user
 | 
			
		||||
        $files = explode(PHP_EOL, $find_result);
 | 
			
		||||
        if (is_array($files)) {
 | 
			
		||||
        $files = array_diff(explode(PHP_EOL, $find_result), array(
 | 
			
		||||
            "$tmp_dir/logs/error_log",
 | 
			
		||||
            "$tmp_dir/logs/access_log",
 | 
			
		||||
        ));
 | 
			
		||||
        if (!empty($files)) {
 | 
			
		||||
            print_fail(
 | 
			
		||||
                "We have found some files that are owned by a different user than $tmp_user, " .
 | 
			
		||||
                'this will stop you updating automatically and / or rrd files being updated causing graphs to fail.',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user