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

Wrong file permission on newly created files when logged in with 'Administrative access' #65

Open
KKoukiou opened this issue Feb 2, 2023 · 2 comments

Comments

@KKoukiou
Copy link

KKoukiou commented Feb 2, 2023

Bug Info

Creating a new file or directory when logged in with a normal user, but having elevated permissions (Administrative access) will create files owned by root:root instead of the current user.

To Reproduce
Steps to reproduce the behavior:

  1. Click on 'New file' or 'New director' icon buttons in the UI and create that
  2. See file ownership bring root:root

Expected behavior
currentuser:currentuser permissions are expected, even when logged in with 'Administrative access'

Screenshots
Screen Shot 2023-02-02 at 16 38 02

Screen Shot 2023-02-02 at 16 38 10

@ahmedr2001
Copy link

I think the problem is that when we spawn the touch.py3 process using cockpit.spawn() we pass "superuser": "try", which tries to run the process as root (which I think it succeeds to do since the user has administrative access, not sure). When a user creates a file as root, the owner of the file will be root:root.

@ragavpr
Copy link

ragavpr commented Apr 11, 2023

As an user, I have experienced this many times in Linux, where I expect my user account to be the owner when creating a file as root, however I got used to root being the owner then changing permissions as required over time,

Some might prefer the ability to modify filesystems with 'superuser',
Many will have Administrative access active and still expect the filesystem modifications be done without 'superuser'.

If we use a toggle at the top bar of file manager page to edit files as "superuser" / "regular user", defaulting to "regular user", this enables a quick way to switch to and back from 'administrator mode' just for the file manager page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants