Ghosts affect liquids and gasses, but not solids.
This is best shown by the Rowling's Pottermore writing on Ghosts.
Ghosts can pass through solid objects without causing damage to themselves or the material, but create disturbances in water, fire and air. The temperature drops in the immediate vicinity of a ghost, an effect intensified if many congregate in the same place. Their appearance can also turn flames blue. Should part or all of a ghost pass through a living creature, the latter will experience a freezing sensation as though they have been plunged into ice-cold water.
Pottermore - Ghosts
This is also collaborated by Rowling's previous writings:
Ghosts cannot affect solids
In the second book we see that Nearly Headless Nick is unable to move a cabinet by himself, and has to persuade Peeves to do it, showing that ghosts cannot move solid objects.
Nearly Headless Nick came gliding out of a classroom. Behind him, Harry could see the wreckage of a large black-and-gold cabinet that appeared to have been dropped from a great height.
“I persuaded Peeves to crash it right over Filch’s office,” said Nick eagerly. “Thought it might distract him —”
Harry Potter and the Chamber of Secrets - Chapter Eight
Ghosts can affect liquids
Myrtle gave a tragic sob, rose up in the air, turned over, and dived headfirst into the toilet, splashing water all over them and vanishing from sight, although from the direction of her muffled sobs, she had come to rest somewhere in the U-bend.
Harry Potter and the Chamber of Secrets - Chapter Nine
Ghosts can affect gasses
The second of Rowling's W.O.M.B.A.T. tests included a question asking to identify a false statement from a list of five statements.
Which of the following statements is FALSE?
☐ Ghosts can cause movement of both liquid and gas
☐ Freshwater merpeople are less warlike than salt [correct answer]
☐ The werewolf's snout is shorter than that of the true wolf
☐ There are no male Veela
☐ Hags have four toes on each foot
W.O.M.B.A.T. Grade Two - Part One: Magical Beings - Question 2
According to Roonwit's analysis of the scoring, full credit was given for the merpeople choice, and no credit for the ghosts choice. Thus we can conclude that the statement about ghosts was not a false statement (i.e. it's a true statement), and that "ghosts can cause movement of both liquid and gas".