#[SOLVED] question: `brew install [package]` fails in default config, is this expected?
1 messages · Page 1 of 1 (latest)
yeah so this is the cause of the issue. Currently the way secureblue sets up homebrew, it hard-codes that it's owned by UID 1000, that is, the first ordinary (non-system) user created on the system
you can change the ownership to your main login user by running this command:
run0 -i chown -R user:user /home/linuxbrew
(replacing user with your username)
but this will then break the brew auto-update services since those assume UID 1000 as well
so to fix that, you'd need to add systemd overrides to the systemd user units brew-update.service, brew-update.timer, brew-upgrade.service, and brew-upgrade.timer changing ConditionUser=1000 to ConditionUser=user (again, replacing user with your username)
and yes, this situation with hardcoding UID 1000 is not ideal
Royal and I have discussed switching to using my "brew-proxy" approach to homebrew and we'll probably do that after Fedora 44 releases—this will mean that the homebrew installation is owned by a dedicated "linuxbrew" system user and any user can request to run brew commands but will be asked to authenticate for certain commands
(this will work better on multi-user setups as well)
having different parts of the homebrew installation owned by different users is a Bad Idea and would probably break more things lol
I think it would probably be simpler to change the UID of your existing user, which you can do with the usermod command... you'd need to free up UID 1000 first though, so change the UID of admin first (maybe to 1002, if that's free) and then the UID of user
for reference: https://www.man7.org/linux/man-pages/man8/usermod.8.html see the -u option
just make sure that you have some account in the wheel group at all times—if you were to delete the admin account without making another wheel-group user first, you'd have no way to get a root shell and would be locked out of the system
which you could fix by mounting the filesystem from a live USB and manually editing /etc/passwd, but it'd still be a nuisance to fix
[SOLVED] question: brew install [package] fails in default config, is this expected?
the ISO installer is going to change with the F44 release so I think we should wait until then to make changes to the install instructions
also brew is the only thing hardcoded to UID 1000 so once we change that, it won't actually matter which order the user creates the accounts in
is this implemented yet?
nope, follow this PR to see when it's implemented: https://github.com/secureblue/secureblue/pull/2169
(the implementation is done but it'll need to be reviewed and tested first)
if i already installed fedora secureblue before this, will it automatically switch my brew installation and its permissions to this?
(sorry if this is a stupid question lol)
it's a reasonable question, and yes, there will be a migration service that will change ownership and permissions in the background to ensure the transition is basically seamless for existing users
quick question: as of now what's the default permissions for homebrew in secureblue (chmod)
I believe the installation is created with 755 permissions, but the default umask is 027, so additional files and directories created later by the user will be created with 750 (for directories) or 640 (for non-executable files) permissions
the migration service will fix up all these permissions
as you've probably noticed if you tried to use homebrew on a multi-user system, the current setup very much is not designed to work with multiple users
yeah i screwed up by trying to set chmod permissions to fix that
lol yeah part of the motivation for brew-proxy was me trying to figure out how to allow multiple users to manage a brew installation in a sensible way, and coming to the conclusion that having the installation owned by a dedicated system user was the best way
off topic but how do i fix this 😭 this is what i tried to do before i saw this support thread
what do you want the permissions to be?
#1494389834591113357 message
do i just do the command above for all of the directories i messed up on?
chown is for changing ownership, not permissions