Segmentation violation on FreeBSD 13.1 #620
Description
Activity
- addederror messageIssues related to bad error messagesIssues related to bad error messages
on Jan 6, 2023 I'm able to replicate this if the
pagesdirectory is gone. We don't maintain the FreeBSD package, so this issue will need to be brought up with them to fix this particular installation issue.As for us, I'll mark this as an error message issue, so we can print out something more user-friendly when this happens in the future.
- added a commit that references this issue
on Jan 6, 2023 We do ship the
pagesdirectory, so I'm not sure what the specific problem is.It is possible that the binary is looking for the
pagesdirectory in the wrong place. Following FreeBSD conventions, we are installing the binary into/usr/local/bin, whereas the files served by HTTP go to/usr/local/www. I'm currently investigating this.Reacted by Matt Baer@clausecker do you have
static_parent_dir,pages_parent_dir, etc. set to/usr/local/wwwin the config file?@thebaer We have the user run the command
su -m "$writefreely_user" -c "/usr/local/bin/writefreely -c '$writefreely_config' config start"to generate the configuration file. We do not edit the config file afterwards. A sample config file generated from this command looks like this:
[server] hidden_host = port = 8080 bind = localhost tls_cert_path = tls_key_path = autocert = false templates_parent_dir = static_parent_dir = pages_parent_dir = keys_parent_dir = hash_seed = gopher_port = 0 [database] type = sqlite3 filename = writefreely.db username = password = database = host = localhost port = 3306 tls = false [app] site_name = admin site_description = host = http://localhost:8080 theme = write editor = disable_js = false webfonts = true landing = simple_nav = false wf_modesty = false chorus = false forest = false disable_drafts = false single_user = true open_registration = false open_deletion = false min_username_len = 3 max_blogs = 1 federation = false public_stats = true monetization = false notes_only = false private = false local_timeline = false user_invites = default_visibility = update_checks = false disable_password_auth = false [oauth.slack] client_id = client_secret = team_id = callback_proxy = callback_proxy_api = [oauth.writeas] client_id = client_secret = auth_location = token_location = inspect_location = callback_proxy = callback_proxy_api = [oauth.gitlab] client_id = client_secret = host = display_name = callback_proxy = callback_proxy_api = [oauth.gitea] client_id = client_secret = host = display_name = callback_proxy = callback_proxy_api = [oauth.generic] client_id = client_secret = host = display_name = callback_proxy = callback_proxy_api = token_endpoint = inspect_endpoint = auth_endpoint = scope = allow_disconnect = false map_user_id = map_username = map_display_name = map_email =The writefreely daemon is started with its working directory being
/usr/local/www/writefreely, which contains thepages,templates, andstaticdirectories. It starts and serves the blog just fine. Is there some extra configuration we need to perform?@realseb1g Does the problem still occur if you execute this command from
/usr/local/www/writefreely?@realseb1g Thanks, I'll note this as a possible workaround. @thebaer what do you recommend we do to fix this? Is there an easy way to correctly set these configuration keys on initial config generation?
There isn't anything built in to the application to set those values. But the config process only alters values it asks about. So you could supply a default
config.inifile with just the values you want populated, then when users runwritefreely config start, the process will fill in the rest without overwriting them. For example:[server] templates_parent_dir = /usr/local/www static_parent_dir = /usr/local/www pages_parent_dir = /usr/local/www@thebaer That's a good idea! I'll go ahead and try that.
I am trying to set up a fresh install of writefreely 0.13.2 on FreeBSD 13.1 (MySQL backend) and getting a segfault when trying to create an admin user (i selected the multi-user instance option during configuration).
The package is directly from FreeBSD repositories.
