mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-10-30 18:50:53 +00:00 
			
		
		
		
	setup: tighten permissions to setup mods backup in user-data
This commit is contained in:
		
							parent
							
								
									e0a237c857
								
							
						
					
					
						commit
						f8bba1b2b8
					
				| @ -31,13 +31,16 @@ backup_mods() { | ||||
|     if [ -d "$LOCAL_MODS_DIR" -a ! -z "$(ls -A "$LOCAL_MODS_DIR" 2>/dev/null)" ]; then | ||||
|         local tmp="$dst.new" | ||||
|         mkdir -p "$(dirname "$dst")" | ||||
|         chmod 750 "$(dirname "$dst")" | ||||
|         pushd "$LOCAL_MODS_DIR" >/dev/null | ||||
|         rm -f "$tmp" | ||||
|         tar czf "$tmp" \ | ||||
|             --exclude-backups \ | ||||
|             --exclude-caches \ | ||||
|             --exclude=*/__pycache__/* \ | ||||
|             --exclude=*/__pycache__ \ | ||||
|             * | ||||
|         chmod 640 "$tmp" | ||||
|         popd >/dev/null | ||||
|         rm -f "$dst" | ||||
|         mv "$tmp" "$dst" | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user