Hi, I wasn't sure if this should be put as an issue in either attachment or filemanager module. I use 4.7.1 and was upgrading to 4.7.2 when I encountered this problem:
1) attach a file, say, file_A, to a node
1) Copy the 'files' folder to any other folder in Drupal
2) Delete the original 'files' folder
3) Move the copied 'files' folder back (This is done, for instance, when you do a Drupal upgrade)
Now, if you try to delete file_A, it says
"warning: unlink(/.../sites/default/files/active/0/file_A): Permission denied in /.../includes/file.inc on line 467."
Also, when you try to upload file_B using the attachment module, when you click 'add' the following error appears:
"The selected file /tmp/tmp_bwK8sT could not be uploaded, because the destination /.../sites/default/files/working/0/file_B is not properly configured.
Error saving upload to filestore. "
Note that I use site specific 'files' folders.
This is really weird, because I checked the permissions, and the copied 'files' folder has the same permissions as the original one, but it just does not work.
A partial solution seems to be that you delete the "files/active" and "files/working" folders, then upload an attachment. The filemanager module will automatically recreate the folders and all will work. This has the big disadvantage of losing all your previous attachments though.
Even more oddly, this error does not occur if you MOVE (not copy) the 'files" folder to another location, then MOVE it back.