As I searched through the list of unanswered questions for ones that I might be able to answer, I saw this question’s title and I figured that it might be an issue with file attributes. As detailed in the question’s comments, the immutable attribute had been set and @slm posted the solution:
sudo chattr -i /var/www/update
However, @slm also asked a very pertinent question, “why is that bit set in the first place?” The first time I learned of the immutable bit was when I was asked to look at a server that had been rooted. The binaries for ps and lsof had been replaced with modified versions (in order to hide other malicious processes) and the immutable bit had been set to prevent any future OS updates from replacing the malicious executables with updated genuine versions.
dmesg | tail -n 20immediately after thechown/chmodcall. It may be a good idea to runfsckon that filesystem. Is that directory a mount point?lsattron it as well to see if the immutable bit is set. Is it a mountpoint for a special kind of filesystem?sudo chattr -i /var/www/updatewill turn it off, but ask yourself why is that bit set in the first place?