-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Your personal settings will not be saved #4573
Comments
|
The error occurs because fish cannot write to its configuration directory. If you give it one to write to it'll go away. So set either $HOME or $XDG_CONFIG_HOME (fish will fall back to $HOME/.config if this is unset, which is how it is coming up with /.config) to somewhere that fish can write to. Or is something stopping you from doing that? |
|
Though note that, if you don't need to save settings, this message is safe to ignore. |
|
Im just not sure why /.config is 700 while all other .config directories are created with 755 drwx------ 3 root wheel /.config |
That's probably because fish created those directories while running as root (with a $HOME of /), and something else created /root/.config. Note that, on my system, directories in .config are split between 755 and 700, so there doesn't seem to be a consensus on those. Either way, fish would actually require write permissions here (to persist universal variables or do Your situation is quite weird - you have a non-user executing fish with a non-$HOME that you apparently also used with root. It also appears (from #3959) that your system is using your login shell to run unrelated scripts, which as I've said is something that is likely to cause issues. I can't see much we can do here - we could silence the message, but that would mean that other people won't notice an honest case of misconfiguration. The easiest thing to do is probably for you to just ignore the message - if you don't use universal variables or |
|
In some cases FreeBSD services start a process with a different user via su -m. fish: The error was 'Permission denied'. Fish does not find its directories and creates /.config and /.local with 700. fish: Unable to locate config directory derived from $HOME: '//.config/fish'. If HOME is / fish creates the path //.config/fish. |
That shouldn't make a difference. Like you said, "The error was 'Permission denied'". Fish can't read /.config, so it has no permissions to see /.config/fish. Though the standard leaves some ambiguity here:
I don't think that any particular implementation actually does something different here for exactly two leading slashes (and I have no idea why that's even in there).
It tells you that it can't write to its config directory (because it can't). If you don't need it to, you can ignore that.
No, it wouldn't. 755 is write permissions for the owner only, but you're not launching fish as the owner here! Fish would find the configuration file (and could read it), but it would be the wrong user's configuration file, so it's not clear that it should read it.
Fish will require write permissions if it is instructed to write universal variables or save a function. But we want the error message to appear before that, so users who have made an honest configuration mistake are informed before they've tried to make a bunch of changes. Let me just ask directly: What do you expect us to do here? |
|
It turns out that fish is just more verbose than other shells in this particular case. I will follow your advice and just ignore the messages. Thanks for your support. |
While playing around with FreeBSD services I found the underlying cause of #3959
The problem occurs when fish is the root shell and a service starts a process with a system account like www.
fish: Your personal settings will not be saved.
www has no login shell and fish is used as fallback
fish: Unable to locate config directory derived from $HOME: '//.config/fish'.
service sets HOME to /
fish: The error was 'Permission denied'.
www has no permissions on /.config
Someone could argue that its bad pratice to change root login shells, but I really want to use fish for root on my local test systems.
The text was updated successfully, but these errors were encountered: