Permissions of uploaded resources not correct
The permissions are not correct and furthermore the setgid bit doesn't have any effect.
Updated by Karsten Dambekalns over 10 years ago
- Status changed from New to Needs Feedback
- Assignee set to Karsten Dambekalns
The use of move_uploaded_file() obviously "creates" a new file at the target, that's why the setgid bit is effective. With rename() the file is moved "together" with it's group, so no setgid bit taking effect (also not using plain mv in a shell).
The question now is, do we want to add a group and/or permission setting for files created by FLOW3 to use chgrp() and chmod() to set accordingly?
Updated by Karsten Dambekalns over 9 years ago
Christian Mueller wrote:
Isn't the current state enough with calling fixFilePermissions after move_uploaded_file()
No, because that only does a
move_uploaded_file() "ignores" the setgid bit, as I pointer out above. What would be more interesting is if we ignore this, document it somehow and can live with ACLs - because it should work fine.