Light sweet crude oil for September delivery rose 26 cents, to $21.34 a barrel.
Contracts for September delivery closed yesterday at $65.80 a barrel, up 90 cents, or 1.4 percent.
Coffee settled 3.81 cents higher for September delivery, at $1.1834 a pound.
Crude oil prices fell 26 cents a barrel, to $20.73, for September delivery.
The cotton contract for September delivery settled at 75.89 cents a pound.
The contract for September delivery of coffee settled 9.37 cents higher at $1.1820 a pound.
Crude oil for September delivery, however, fell by 84 cents a barrel yesterday, to $47.86.
The price of September deliveries has risen about 10 percent in the last month.
The contract for September delivery closed at $28.31, up 26 cents.
They fell again yesterday, with coffee for September delivery down 4.3 cents, to $1.433 a pound.