workflowproducts / envelope

Publish web apps based on your PostgreSQL database fast!
https://workflowproducts.com/envelope.html
Apache License 2.0
53 stars 2 forks source link

when i upload an image to a web root folder it doesn't get the right permissions #116

Closed justintocci closed 6 years ago

justintocci commented 6 years ago

pretty sure we want to make it so that the proper permissions are created. if this is a unix issue, let me know and I'll tell you where it needs to be fixed.

josephtocci commented 6 years ago

These appear to be the three instances I think will need to be changed. 0770 permissions on all three of them currently, what needs to change?

https://github.com/workflowproducts/envelope/blob/master/src/ws_file.c#L1045

https://github.com/workflowproducts/envelope/blob/18aa733adc89f68e248c3b0ea26162a631f0e821/src/http_upload.c#L122

https://github.com/pgManage/pgManage/blob/7846be3102afedf470607bd5df847218d090748c/src/ws_tab.c#L797

nunziotocci commented 6 years ago

0770 is fine, that's not the issue.

The user/group permissions needs to be configurable, like nginx allows you to set the uid and gid for the process.

See setuid(2), setgid(2), getpwnam(3), getgrnam(3)

nunziotocci commented 6 years ago

Fixed, will be seen in the next release.