Copy ownership/perms from source to rw-branch in read-only mode.
authorTails developers <amnesia@boum.org>
Wed, 29 Feb 2012 15:03:32 +0000 (16:03 +0100)
committerDaniel Baumann <daniel@debian.org>
Thu, 5 Apr 2012 05:47:38 +0000 (07:47 +0200)
The union mountpoint inherits ownership/permissions from the rw-branch,
which in this case is a directory created by root, and not the source,
which has the correct ownership/perms.

scripts/live-helpers

index 243256a..797cae1 100644 (file)
@@ -1458,6 +1458,8 @@ do_custom_mounts ()
                                cow_dir="/live/cow/${dest}"
                        fi
                        mkdir -p ${cow_dir}
+                       chown --reference "${source}" "${cow_dir}"
+                       chmod --reference "${source}" "${cow_dir}"
                        do_union ${dest} ${cow_dir} ${source} ${rofs_dest_backing}
                fi