diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index 2d96ab130..41a448a6d 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -1323,9 +1323,16 @@ int cg_shift_path(const char *cgroup, const char *root, const char **shifted) {
                  * let's determine it from PID 1 */
 
                 r = cg_get_root_path(&rt);
-                if (r < 0)
-                        return r;
+                if (r < 0) {
+                        /* If failed to determine session from PID 1 because access
+                         * to PID 1 (/proc/1) is denied (hidepid>0), try root "/" */
+                        if (r != -ESRCH && r != -EACCES)
+                                return r;
 
+                        rt = strdup("/");
+                        if (!rt)
+                                return -ENOMEM;
+                }
                 root = rt;
                 log_debug_elogind("Determined root path: \"%s\"", root);
         }
