Nonsense Chmod Error Suddenly Being Thrown (Called By Assetmanager::pubblish())

Starting from NOW (meaning it used to work until yesterday), on my local machine with xampp (on Ubuntu), my web application which has always worked fine until now, gives me errors caused by chmod() called by AssetManager:

PHP WARNING at /media/DATA/.../CAssetManager.php (233): chmod(): Operation not permitted

The assets directory has 777 permissions, as it always has had.

This doesn’t make any sense, this worked yesterday.

May this be because of some update in the system (it can’t even be php, because xampp doesn’t get automatically updated) that cause some permissions to be treated differently??

There’s not even any reason why AssetManager should be chmod’ing anything in the first place, as I hadn’t modified nor added any asset nor touched any asset directory, so the asset were all already there. NOW I have deleted the subfolders in assets to see what would happen: it publishes a few assets but then dies with the error.

What gives????

The folder webroot is on a ntfs partition, so all the files, even those in the assets folder (created by php by copying them) belong to user “teo” which is me (not sure whether that would be the case on a linux partition, since I don’t know whether the owner is preserved when copying files); but that doesn’t completely explain why the chmod fails:

  • maybe apache/php doesn’t run as root? (i think it does in xampp)

  • why this didn’t happen until a few hours ago?

CRAZY!! It has stopped happening. I’ve done absolutely nothing!

A wyiizard come to your code and solved your issue!