- Default permissions for cache/images broken on new installations
- Permissions on misc dirs not set to www:www
- apache sample updated with 2.4 syntax
- Add missing PHP extension iconv
Reported by Ulrich Spörlein #248601
Differential D26061
www/tt-rss: Fix permissions, apache sample, add php dep. dereks_lifeofadishwasher.com on Aug 13 2020, 9:58 PM. Authored by Tags None Referenced Files
Subscribers None
Details
Reported by Ulrich Spörlein #248601
Diff Detail
Event TimelineComment Actions
The file was moved by 197045. It was suitable as a use case for the @sample plist documented here. If I had to guess why the config.php was crated it prevents someone from entering the web based installer on first install that you otherwise didn't want to make changes and to enforce the file permissions of 0400. This is only a guess having a config.php has existed since the ports creation. I'd rather keep it this way. However, supporting the web installer might still be possible by an addition to the pkg-message mentioning:
However, depending on the config of the web server this might leave config.php readable by group/others. Maybe add a patch for touch/chmod the file before writing it? Comment Actions I'm not sure the rename is worth it, just to make the @sample usage simpler. There's even support for -dist, so let's use that. Don't worry too much about permissions either. The web UI helpfully prints out the full config (except it wasn't able to print anything in my case) telling folks to copy-paste that into their config. There's a button that one can use to _try_ and have the webserver write it out, but of course that _should_ fail most of the time for strictly configured webservers. Comment Actions Oh wait, if we use @sample, then config.php-dist will be copied to config.php (but it has bogus values) so the whole web config will fall on its nose. So I think the best way forward is to not use @sample at all and instead ship config.php-dist as a regular file (that get's updated with a new version). Then the users can copy that to config.php or let the web UI spit out a config.php that they can write down using sudo or whatever. Comment Actions I still believe having a config.php is the right thing to do here. Looking at other packaged tt-rss they all include a config.php so I think the same should still appear here. Cleaned the pkg-plist removing useless files and to only be www user writable in the places its required. root:www g+r every where else. A couple nitpicks with the Makefile and if conditionals moving to portish options. If you have a portable version of nginx config you want to add here I think that would be a good addition.
Comment Actions Tested this with uninstall/reinstalls confirming the permissions were what we expect. Comment Actions Make the base directory root:www owned 755 Making the base directory www owned means it can delete and write to the directory undoing the main purpose of only allowing www write to only the places it needs to. Since the web installer can't write to the base directory remove the patch as well. Comment Actions Looks good, do you want me to go ahead and commit this on your behalf?
|