bugfix - do chmod last
This commit is contained in:
		
					parent
					
						
							
								23eba4c5e1
							
						
					
				
			
			
				commit
				
					
						37c02dad45
					
				
			
		
					 1 changed files with 6 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -34,11 +34,6 @@ case "$state_should" in
 | 
			
		|||
         fi
 | 
			
		||||
      fi
 | 
			
		||||
 | 
			
		||||
      # Mode settings
 | 
			
		||||
      if [ -f "$__object/parameter/mode" ]; then
 | 
			
		||||
         echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\"
 | 
			
		||||
      fi
 | 
			
		||||
 | 
			
		||||
      # Group
 | 
			
		||||
      if [ -f "$__object/parameter/group" ]; then
 | 
			
		||||
         echo chgrp \"$(cat "$__object/parameter/group")\" \"$destination\"
 | 
			
		||||
| 
						 | 
				
			
			@ -48,6 +43,12 @@ case "$state_should" in
 | 
			
		|||
      if [ -f "$__object/parameter/owner" ]; then
 | 
			
		||||
         echo chown \"$(cat "$__object/parameter/owner")\" \"$destination\"
 | 
			
		||||
      fi
 | 
			
		||||
 | 
			
		||||
      # Mode - needs to happen last as a chown/chgrp can alter mode by
 | 
			
		||||
      # clearing S_ISUID and S_ISGID bits (see chown(2))
 | 
			
		||||
      if [ -f "$__object/parameter/mode" ]; then
 | 
			
		||||
         echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\"
 | 
			
		||||
      fi
 | 
			
		||||
   ;;
 | 
			
		||||
 | 
			
		||||
   absent)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue