From e97f80f4fb843584113b2417f9f39f88485b8c17 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 20 Mar 2021 15:15:31 -0400 Subject: [PATCH 1/6] usb_lib/tasks/install.yml: add ',umask=0000' to MOUNTOPTIONS in /etc/usbmount/usbmount.conf for Kolibri exports --- roles/usb_lib/tasks/install.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/roles/usb_lib/tasks/install.yml b/roles/usb_lib/tasks/install.yml index 49f5044ef..6887e9f29 100644 --- a/roles/usb_lib/tasks/install.yml +++ b/roles/usb_lib/tasks/install.yml @@ -61,12 +61,20 @@ - { src: 'iiab-usb_lib-show-all-off', dest: '/usr/bin/', mode: '0755' } - { src: 'iiab-clean-usb.sh', dest: '/usr/sbin/', mode: '0755' } -- name: Enable exFAT and NTFS in /etc/usbmount/usbmount.conf +- name: Add ' exfat fuseblk ntfs' to FILESYSTEMS var in /etc/usbmount/usbmount.conf lineinfile: - regexp: '^FILESYSTEMS.*' + regexp: '^FILESYSTEMS=.*' line: 'FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus exfat fuseblk ntfs"' path: /etc/usbmount/usbmount.conf +# Setting 'umask=0000' for partic filesystems e.g. {fat, vfat, ntfs} appears to accomplish the exact same thing: +# FS_MOUNTOPTIONS="-fstype=fat,umask=0000 -fstype=vfat,umask=0000 -fstype=ntfs,umask=0000" +- name: "Add ',umask=0000' to MOUNTOPTIONS var in /etc/usbmount/usbmount.conf, so Kolibri exports work" + lineinfile: + regexp: '^MOUNTOPTIONS=.*' + line: 'MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime,umask=0000"' + path: /etc/usbmount/usbmount.conf + - name: Install /etc/{{ apache_conf_dir }}/content_dir.conf from template template: src: content_dir.conf From a28117358ec99d9b0c11c7a3dcb409132b01abb1 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 20 Mar 2021 18:48:34 -0400 Subject: [PATCH 2/6] usb_lib/tasks/install.yml: exfat would also need umask=0000 --- roles/usb_lib/tasks/install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/usb_lib/tasks/install.yml b/roles/usb_lib/tasks/install.yml index 6887e9f29..724d78f87 100644 --- a/roles/usb_lib/tasks/install.yml +++ b/roles/usb_lib/tasks/install.yml @@ -67,8 +67,8 @@ line: 'FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus exfat fuseblk ntfs"' path: /etc/usbmount/usbmount.conf -# Setting 'umask=0000' for partic filesystems e.g. {fat, vfat, ntfs} appears to accomplish the exact same thing: -# FS_MOUNTOPTIONS="-fstype=fat,umask=0000 -fstype=vfat,umask=0000 -fstype=ntfs,umask=0000" +# Setting 'umask=0000' for partic filesystems e.g. {fat, vfat, ntfs, exfat} appears to accomplish the exact same thing: +# FS_MOUNTOPTIONS="-fstype=fat,umask=0000 -fstype=vfat,umask=0000 -fstype=ntfs,umask=0000 -fstype=exfat,umask=0000" - name: "Add ',umask=0000' to MOUNTOPTIONS var in /etc/usbmount/usbmount.conf, so Kolibri exports work" lineinfile: regexp: '^MOUNTOPTIONS=.*' From fca9ce37bd589448704793e7ae68249bbaccf23e Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 21 Mar 2021 12:24:34 -0400 Subject: [PATCH 3/6] usb_lib/tasks/install.yml: FS_MOUNTOPTIONS in /etc/usbmount/usbmount.conf (is another way to get usbmount to work w/ Kolibri) --- roles/usb_lib/tasks/install.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/roles/usb_lib/tasks/install.yml b/roles/usb_lib/tasks/install.yml index 724d78f87..f4f6c485d 100644 --- a/roles/usb_lib/tasks/install.yml +++ b/roles/usb_lib/tasks/install.yml @@ -67,14 +67,19 @@ line: 'FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus exfat fuseblk ntfs"' path: /etc/usbmount/usbmount.conf -# Setting 'umask=0000' for partic filesystems e.g. {fat, vfat, ntfs, exfat} appears to accomplish the exact same thing: -# FS_MOUNTOPTIONS="-fstype=fat,umask=0000 -fstype=vfat,umask=0000 -fstype=ntfs,umask=0000 -fstype=exfat,umask=0000" -- name: "Add ',umask=0000' to MOUNTOPTIONS var in /etc/usbmount/usbmount.conf, so Kolibri exports work" +- name: "Set 'umask=0000' for {FAT, VFAT/FAT32, NTFS, exFAT} using var FS_MOUNTOPTIONS in /etc/usbmount/usbmount.conf, so Kolibri exports work" lineinfile: - regexp: '^MOUNTOPTIONS=.*' - line: 'MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime,umask=0000"' + regexp: '^FS_MOUNTOPTIONS=.*' + line: 'FS_MOUNTOPTIONS="-fstype=fat,umask=0000 -fstype=vfat,umask=0000 -fstype=ntfs,umask=0000 -fstype=exfat,umask=0000"' path: /etc/usbmount/usbmount.conf +# Setting 'umask=0000' for all filesystems: (accomplishes the same thing as above) +#- name: "Add ',umask=0000' to MOUNTOPTIONS var in /etc/usbmount/usbmount.conf, so Kolibri exports work" +# lineinfile: +# regexp: '^MOUNTOPTIONS=.*' +# line: 'MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime,umask=0000"' +# path: /etc/usbmount/usbmount.conf + - name: Install /etc/{{ apache_conf_dir }}/content_dir.conf from template template: src: content_dir.conf From 575647cf62a6d944701e696bb0ae15e035e9bea6 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 21 Mar 2021 12:45:53 -0400 Subject: [PATCH 4/6] roles/usb_lib/README.rst: update documentation --- roles/usb_lib/README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/usb_lib/README.rst b/roles/usb_lib/README.rst index 06ae5f1b5..b4a2698e0 100644 --- a/roles/usb_lib/README.rst +++ b/roles/usb_lib/README.rst @@ -18,14 +18,14 @@ Automount is handled by usbmount, and scripts in this role look in the root of t ...and if found, creates a symlink of the form /library/www/html/local_content/USBn pointing to /media/usbn. -USB drives must be formatted with one of the filesystems listed under "FILESYSTEMS=" at /etc/usbmount/usbmount.conf +USB drives must be formatted with one of the filesystems listed under "FILESYSTEMS=" at ``/etc/usbmount/usbmount.conf`` — these are specified on/around Line 67 of: `/opt/iiab/iiab/roles/usb_lib/tasks/install.yml `_ Official `usbmount `_ documentation, from 2010: * https://github.com/hfuchs/usbmount/blob/master/README * https://github.com/hfuchs/usbmount/blob/master/usbmount.conf -As of March 2021, better Kolibri integration/support is being investigated: `#2713 `_ +In March 2021, Kolibri exports were enabled, using ``umask=0000`` (also within /etc/usbmount/usbmount.conf) to override what was ``umask=0022`` by default: `PR #2715 `_ Legacy: There is also a patch for problems with automount on Fedora 21+. Please Note that as of 4.1.8-200.fc22.x86_64 not all USB drives will mount, even with this patch. From 342c78bfb4a4eb49a3ebf21409af9a853c2cb715 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 21 Mar 2021 12:48:12 -0400 Subject: [PATCH 5/6] usb_lib/tasks/install.yml: FAT support no longer nec it seems--only {VFAT, NTFS, exFAT} --- roles/usb_lib/tasks/install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/usb_lib/tasks/install.yml b/roles/usb_lib/tasks/install.yml index f4f6c485d..8ec96623c 100644 --- a/roles/usb_lib/tasks/install.yml +++ b/roles/usb_lib/tasks/install.yml @@ -67,10 +67,10 @@ line: 'FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus exfat fuseblk ntfs"' path: /etc/usbmount/usbmount.conf -- name: "Set 'umask=0000' for {FAT, VFAT/FAT32, NTFS, exFAT} using var FS_MOUNTOPTIONS in /etc/usbmount/usbmount.conf, so Kolibri exports work" +- name: "Set 'umask=0000' for {VFAT/FAT32, NTFS, exFAT} using var FS_MOUNTOPTIONS in /etc/usbmount/usbmount.conf, so Kolibri exports work" lineinfile: regexp: '^FS_MOUNTOPTIONS=.*' - line: 'FS_MOUNTOPTIONS="-fstype=fat,umask=0000 -fstype=vfat,umask=0000 -fstype=ntfs,umask=0000 -fstype=exfat,umask=0000"' + line: 'FS_MOUNTOPTIONS="-fstype=vfat,umask=0000 -fstype=ntfs,umask=0000 -fstype=exfat,umask=0000"' path: /etc/usbmount/usbmount.conf # Setting 'umask=0000' for all filesystems: (accomplishes the same thing as above) From 02dd29468ed1ffff86c04a71b578486b944e71b4 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 21 Mar 2021 12:52:42 -0400 Subject: [PATCH 6/6] roles/usb_lib/README.rst: clean doc for readability --- roles/usb_lib/README.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/roles/usb_lib/README.rst b/roles/usb_lib/README.rst index b4a2698e0..722eb3b44 100644 --- a/roles/usb_lib/README.rst +++ b/roles/usb_lib/README.rst @@ -20,12 +20,11 @@ Automount is handled by usbmount, and scripts in this role look in the root of t USB drives must be formatted with one of the filesystems listed under "FILESYSTEMS=" at ``/etc/usbmount/usbmount.conf`` — these are specified on/around Line 67 of: `/opt/iiab/iiab/roles/usb_lib/tasks/install.yml `_ +In March 2021, Kolibri exports were enabled, using ``umask=0000`` (also within /etc/usbmount/usbmount.conf) to override what was ``umask=0022`` by default: `PR #2715 `_ + Official `usbmount `_ documentation, from 2010: * https://github.com/hfuchs/usbmount/blob/master/README * https://github.com/hfuchs/usbmount/blob/master/usbmount.conf -In March 2021, Kolibri exports were enabled, using ``umask=0000`` (also within /etc/usbmount/usbmount.conf) to override what was ``umask=0022`` by default: `PR #2715 `_ - -Legacy: There is also a patch for problems with automount on Fedora 21+. -Please Note that as of 4.1.8-200.fc22.x86_64 not all USB drives will mount, even with this patch. +Legacy warning: There is also a patch for problems with automount on Fedora 21+. Please note that as of 4.1.8-200.fc22.x86_64 not all USB drives will mount, even with this patch.