Full Access File Permission
Yes, you are right about that, 0x644
is the correct octal permission in most cases. For people like me that are too paranoid about security 0x600
would be better, and 0x777
is definitely bad. However this only works if the server was configured correctly to separate the permissions among user accounts and to work together with the user that runs the web server.
For example, it is common for some hosting providers to use the “www-data” or “nobody” users to run the web server (lets say Apache as an example). When you upload a file through the web interface (using PHP in this case) the file is uploaded in the server as owned by the user that runs the webserver (www-data or nobody in this example). Considering this scenario you will not be able to modify these uploaded files through your own user account because you do not have write permissions.
If the hosting provider has smart system administrator he will probably configure the server to create an alias between the user that runs the web server and the user of each account, or in some rare cases, configure the server to own these resources by the correct user.
I may be wrong but I believe that the plugin is not able to write in those files because they are owned by your own hosting user account, and the PHP interpreter is running on top of the web server which is being managed by a different account, that is why the 0x644
is not working correctly.
Inconsistent Error Message
You are also right about this one, I will check the code once again to see why the message is not showing the correct numbers, this will be probably fixed for the next version of the plugin.
Attribute Error Trap
I have no idea what do you mind by that, English is not my first language ?? Anyway, I suppose this will not be necessary if I fix the issue with the second point. I am also thinking to include a flag in the table that warns the user that a file is not writable (so it can not be restored nor deleted).
Audit Logs Even With Failed Restoration
I will fix that too, thanks for the report.