Skip to content

"lax permissions" check is misleading if directory is a symlink #191

@keysmashes

Description

@keysmashes

I get a warning at the start of every session:

* Warning: Keychain dir has lax permissions. Use chmod -R go-rwx '/home/ash/.cache/keychain' to fix.

but the directory it's complaining about is a symlink:

$ ll -d .cache/keychain
lrwxrwxrwx - ash users 18 Nov 21:36 .cache/keychain -> /run/user/1000/keychain/1000/

and permissions on symlinks are ignored/can't be changed.

Probably keychain should run $keydir through realpath before checking its permissions, or just not warn if the directory is a symlink (under the assumption that a user with such a setup knows what they're doing).

[ "$(ls -ld "${keydir}" | cut -c5-10)" != "------" ] && warn "Keychain dir has lax permissions. Use ${CYAN}chmod -R go-rwx '${keydir}'${OFF} to fix."

Metadata

Metadata

Assignees

Labels

futureidentified as a feature that may be implemented in the future

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions