cockpit-project / cockpit

Cockpit is a web-based graphical interface for servers.
http://www.cockpit-project.org/
GNU Lesser General Public License v2.1
11.2k stars 1.11k forks source link

cockpit: support setting owner/group in fsreplace1 #21128

Open jelly opened 2 weeks ago

jelly commented 2 weeks ago

Cockpit-files wants to support uploading or creating a file owned by the current directory which might be different from the logged in user.

For example as superuser uploading a database into /var/lib/postgresql which would be owned by postgres and the database file should receive the same permissions.


This still needs tests, sadly we can't chown as a normal user so we can't easily write unittests unless we start creating a new user namespace and mapping that user in there (or depending on bwrap).

So I will work on creating integration tests with the playground page to have this properly tested in Cockpit.