Skip to content
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

As non-admin you can't chown to another user #393

Closed
jelly opened this issue Apr 23, 2024 · 6 comments
Closed

As non-admin you can't chown to another user #393

jelly opened this issue Apr 23, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@jelly
Copy link
Member

jelly commented Apr 23, 2024

image

We should not shown this option if you aren't superuser.

@jelly jelly added the bug Something isn't working label Apr 23, 2024
@jelly jelly added this to the First official release milestone Apr 23, 2024
@allisonkarlitskaya
Copy link
Member

I wonder if there's some polkit API we can hit to do this...

@jelly
Copy link
Member Author

jelly commented Apr 23, 2024

I wonder if there's some polkit API we can hit to do this...

This only happens when you drop "privileges" but hmm. Maybe.

@martinpitt
Copy link
Member

See cockpit-project/cockpit#11033 and cockpit-project/cockpit#20283 - in general, predicting this with polkit is difficult 😢

@jelly
Copy link
Member Author

jelly commented Apr 24, 2024

I would like to replicate the behavior of polkit as likely happens in gnome-files but for the first version I think it is more realistic to hide this option.

@jelly
Copy link
Member Author

jelly commented Apr 30, 2024

Using polkit implies using pkexec or do we ship our own rules?

I can't get pkexec to do work for me, while this works fine in a normal GNOME session.

[admin@fedora-40-127-0-0-2-2201 ~]$ pkexec
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ====
Authentication is needed to run `/bin/bash' as the super user
Multiple identities can be used for authentication:
 1.  Administrator (admin)
 2.  fedora Cloud User (fedora)
Choose identity to authenticate as (1-2): 1
Password: 
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie

This seems to depend on a polkit-agent being available, and none of the options seem to be justifiable to install on a server https://wiki.archlinux.org/title/Polkit#Authentication_agents

@jelly
Copy link
Member Author

jelly commented May 22, 2024

The bug was fixed, closing this as changing permissions now works based on if superuser.allowed which is not the polkit case but that is a bigger issue within Cockpit.

@jelly jelly removed this from the First official release milestone May 22, 2024
@jelly jelly added enhancement New feature or request bug Something isn't working and removed bug Something isn't working enhancement New feature or request labels May 22, 2024
@jelly jelly added this to the First official release milestone May 22, 2024
@jelly jelly closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants