Gargaj / wuhu

Lightweight Party Management System
http://wuhu.function.hu/
Other
41 stars 26 forks source link

Revert some changes that break Function orga workflow #64

Closed chainq closed 1 year ago

chainq commented 1 year ago

This PR reverts some changes by @kusma, that broke our Function compo workflow.

The recursive mkdir() call with 0777 permission doesn't equal the explicit mkdir() and chmod() pairs, because in the original case, the umask for the process is ignored for the explicit chmod() while in the "new" code version, mkdir()'s permission is modified by the umask. So the directories were in fact created with 755 mask, and that interfered with direct file manipulation by the orga user via SCP/SFTP. (For example the upload of large video files associated with the entires.)

I was too lazy to figure out how to make sure the umask is the right one for all cases, so I just reverted the two commits for now that broke it for our workflow. Feel free to advise and tell us what we're holding wrong, or provide a better version rather than reverting.

kusma commented 1 year ago

Oops, sorry for that regression. Sure, reverting this makes sense in the light of that.

We didn't use direct file manipulation at Black Valley, which I guess is why we didn't notice.

Gargaj commented 1 year ago

Right, at the time I was more focused on quick solutions to allow the party to go - this sounds like this may be a good idea to set chmod masks as a configurable option ("secure mode" vs "hands-on mode" kind of thing)