How to programatically change file user owner I'm using drupal services module. I can upload files through web services but the problem is all created files has the same owner, that is, the user of the web services. I would like to change this user but I don't know how to do it. 

I have been searching in drupal api functions (file.inc), but I haven't found a function to change this. How could I change the file's owner?
Thanks.
I don't know of a module built to handle this, but you could build something easily enough to do it:


the DB table file_managed handles files, and includes a uid field which is the user ID of the file 'owner'


This could be modified in a custom module, but a MAJOR WARNING that I don't know what potential damage this could cause to other elements of the site, perhaps someone with more experience with the DB could add some advice in this regard