diff options
author | Apoorv Sachan <apoorv.99.sachan@gmail.com> | 2020-06-23 20:32:38 +0530 |
---|---|---|
committer | Apoorv Sachan <apoorv.99.sachan@gmail.com> | 2020-06-24 02:43:31 +0530 |
commit | df969e9491d7b02b0bd122d721e7080a65252ed9 (patch) | |
tree | e3fdd442dfedf4a4fcfedf732ea9ff602333f1b9 | |
parent | dfdd259299fdc3db78b822c8544175caef0551af (diff) | |
download | nautilus-df969e9491d7b02b0bd122d721e7080a65252ed9.tar.gz |
file: Ability to change file-owner in admin:/// backend
Running nautilus as root is no longer recommended/supported.
Priviledged operations like changing file owner, while
running as non-root are supported by the admin backend.
Closes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1534
-rw-r--r-- | src/nautilus-file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nautilus-file.c b/src/nautilus-file.c index 33aabf65f..ff902db12 100644 --- a/src/nautilus-file.c +++ b/src/nautilus-file.c @@ -6374,8 +6374,8 @@ nautilus_file_can_set_owner (NautilusFile *file) return FALSE; } - /* Only root is also allowed to set the owner. */ - return geteuid () == 0; + /* Owner can be changed only in admin backend or by root */ + return nautilus_file_is_in_admin (file) || geteuid () == 0; } /** |