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.
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 bypostgres
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.