mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
multiple files in vars/ and usb_lib/: rename usb_lib_umask0000_for_kolibri to usb_lib_writable_sticks so it is more generally applicable
This commit is contained in:
parent
a20aebf9c2
commit
3b9edfdfc0
11 changed files with 22 additions and 22 deletions
|
@ -20,7 +20,7 @@ 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 76 of: `/opt/iiab/iiab/roles/usb_lib/tasks/install.yml <https://github.com/iiab/iiab/blob/master/roles/usb_lib/tasks/install.yml#L76>`_
|
||||
|
||||
IIAB will generally mount USB drives 'rw' allowing root to both read and write to them. In addition, in March 2021 (`PR #2715 <https://github.com/iiab/iiab/issues/2715>`_) Kolibri exports were enabled by also giving non-root users read and write access to VFAT/FAT32, NTFS and exFAT USB drives, using ``umask=0000`` (in /etc/usbmount/usbmount.conf) to override the ``umask=0022`` default. If however you prefer to restore usbmount's default, set ``usb_lib_umask0000_for_kolibri: False`` in `/etc/iiab/local_vars.yml <http://FAQ.IIAB.IO/#What_is_local_vars.yml_and_how_do_I_customize_it%3F>`_ (preferably do this prior to installing IIAB).
|
||||
IIAB will generally mount USB drives 'rw' allowing root to both read and write to them. In addition, in March 2021 (`PR #2715 <https://github.com/iiab/iiab/issues/2715>`_) Kolibri and other app exports were enabled by also giving non-root users read and write access to VFAT/FAT32, NTFS and exFAT USB drives, using ``umask=0000`` (in /etc/usbmount/usbmount.conf) to override the ``umask=0022`` default. If, however, you prefer to restore usbmount's default, set ``usb_lib_writable_sticks: False`` in `/etc/iiab/local_vars.yml <http://FAQ.IIAB.IO/#What_is_local_vars.yml_and_how_do_I_customize_it%3F>`_ (preferably do this prior to installing IIAB).
|
||||
|
||||
Official `usbmount 0.0.22 (2011-08-08) <https://github.com/rbrito/usbmount/tags>`_ documentation:
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
# iiab_usb_lib_show_all: True
|
||||
|
||||
# Set umask=0000 for VFAT, NTFS and exFAT in /etc/usbmount/usbmount.conf so
|
||||
# Kolibri can export & import channels to USB sticks/drive:
|
||||
# usb_lib_umask0000_for_kolibri: True
|
||||
# Kolibri, upload2usb, and other apps can export & import channels to USB sticks/drive:
|
||||
# usb_lib_writable_sticks: True
|
||||
|
||||
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
||||
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
|
||||
|
|
|
@ -42,7 +42,7 @@ function getTargetFolderPath ($create_folder_p) {
|
|||
$target_folder_path = $parent_dir . $today_folder_name;
|
||||
|
||||
if (!file_exists($target_folder_path) && $create_folder_p) {
|
||||
mkdir($target_folder_path, 0777) or throw new RuntimeException("Not able to create upload directory. <br/>Make sure 'usb_lib_umask0000_for_kolibri' is set to 'True'. <br/><br/>");
|
||||
mkdir($target_folder_path, 0777) or throw new RuntimeException("Not able to create upload directory. <br/>Make sure 'usb_lib_writable_sticks' is set to 'True'. <br/><br/>");
|
||||
}
|
||||
return $target_folder_path;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# https://github.com/rbrito/usbmount/blob/master/README.md (2018-08-10)
|
||||
# https://github.com/rbrito/usbmount/blob/master/usbmount.conf (2010-04-25)
|
||||
|
||||
# usb_lib_umask0000_for_kolibri (e.g., in /etc/iiab/local_vars.yml) must be set to true in order to be able to write to mounted USB sticks
|
||||
# usb_lib_writable_sticks (e.g., in /etc/iiab/local_vars.yml) must be set to true in order to be able to write to mounted USB sticks
|
||||
# If you are still not able to write to a mounted USB stick, you can unmount the drive (sudo umount <mountpoint>) and then remount it setting umask to 0000 manually (sudo mount -o umask=0000 <device name> <mountpoint>).
|
||||
|
||||
|
||||
|
|
|
@ -32,28 +32,28 @@
|
|||
|
||||
# If setup.yml becomes the norm in future, put the 2-3 stanzas below in there:
|
||||
|
||||
- name: "Set 'umask=0000' for {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, upload2usb, and other app exports work"
|
||||
lineinfile:
|
||||
regexp: '^FS_MOUNTOPTIONS=.*'
|
||||
line: 'FS_MOUNTOPTIONS="-fstype=vfat,umask=0000 -fstype=ntfs,umask=0000 -fstype=exfat,umask=0000"'
|
||||
path: /etc/usbmount/usbmount.conf
|
||||
when: usb_lib_umask0000_for_kolibri
|
||||
when: usb_lib_writable_sticks
|
||||
|
||||
# Setting 'umask=0000' for all filesystems: (much the same thing as above, as
|
||||
# the mount command does not use this umask setting for filesystems like ext4)
|
||||
#- name: "Add ',umask=0000' to MOUNTOPTIONS var in /etc/usbmount/usbmount.conf, so Kolibri exports work"
|
||||
#- name: "Add ',umask=0000' to MOUNTOPTIONS var in /etc/usbmount/usbmount.conf, so Kolibri, upload2usb, and other app exports work"
|
||||
# lineinfile:
|
||||
# regexp: '^MOUNTOPTIONS=.*'
|
||||
# line: 'MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime,umask=0000"'
|
||||
# path: /etc/usbmount/usbmount.conf
|
||||
# when: usb_lib_umask0000_for_kolibri
|
||||
# when: usb_lib_writable_sticks
|
||||
|
||||
- name: 'Set FS_MOUNTOPTIONS="" in /etc/usbmount/usbmount.conf, e.g. if Kolibri will not be used'
|
||||
lineinfile:
|
||||
regexp: '^FS_MOUNTOPTIONS=.*'
|
||||
line: 'FS_MOUNTOPTIONS=""' # Restore apt pkg default, e.g. for runrole
|
||||
path: /etc/usbmount/usbmount.conf
|
||||
when: not usb_lib_umask0000_for_kolibri
|
||||
when: not usb_lib_writable_sticks
|
||||
|
||||
|
||||
- name: Enable/Disable/Restart NGINX
|
||||
|
@ -88,5 +88,5 @@
|
|||
value: "{{ usb_lib_install }}"
|
||||
- option: usb_lib_enabled
|
||||
value: "{{ usb_lib_enabled }}"
|
||||
- option: usb_lib_umask0000_for_kolibri
|
||||
value: "{{ usb_lib_umask0000_for_kolibri }}"
|
||||
- option: usb_lib_writable_sticks
|
||||
value: "{{ usb_lib_writable_sticks }}"
|
||||
|
|
|
@ -310,8 +310,8 @@ usb_lib_enabled: True
|
|||
# Show entire contents of USB sticks/drives (at http://box/usb)
|
||||
iiab_usb_lib_show_all: True
|
||||
# Set umask=0000 for VFAT, NTFS and exFAT in /etc/usbmount/usbmount.conf so
|
||||
# Kolibri can export & import channels to USB sticks/drive:
|
||||
usb_lib_umask0000_for_kolibri: True
|
||||
# Kolibri, upload2usb, and other apps can export & import channels to USB sticks/drive:
|
||||
usb_lib_writable_sticks: True
|
||||
systemd_location: /lib/systemd/system # 2-common iiab-startup also uses
|
||||
|
||||
# Common UNIX Printing System (CUPS)
|
||||
|
|
|
@ -195,8 +195,8 @@ bluetooth_term_enabled: False
|
|||
# Show entire contents of USB sticks/drives (at http://box/usb)
|
||||
iiab_usb_lib_show_all: True
|
||||
# Set umask=0000 for VFAT, NTFS and exFAT in /etc/usbmount/usbmount.conf so
|
||||
# Kolibri can export & import channels to USB sticks/drive:
|
||||
usb_lib_umask0000_for_kolibri: True
|
||||
# Kolibri, upload2usb, and other apps can export & import channels to USB sticks/drive:
|
||||
usb_lib_writable_sticks: True
|
||||
|
||||
# Common UNIX Printing System (CUPS)
|
||||
cups_install: True
|
||||
|
|
|
@ -12,7 +12,7 @@ munin_install: True
|
|||
munin_enabled: True
|
||||
vnstat_install: True
|
||||
vnstat_enabled: True
|
||||
usb_lib_umask0000_for_kolibri: False
|
||||
usb_lib_writable_sticks: False
|
||||
allow_www_data_poweroff: False
|
||||
# By default
|
||||
# kiwix
|
||||
|
|
|
@ -195,8 +195,8 @@ bluetooth_term_enabled: False
|
|||
# Show entire contents of USB sticks/drives (at http://box/usb)
|
||||
iiab_usb_lib_show_all: True
|
||||
# Set umask=0000 for VFAT, NTFS and exFAT in /etc/usbmount/usbmount.conf so
|
||||
# Kolibri can export & import channels to USB sticks/drive:
|
||||
usb_lib_umask0000_for_kolibri: True
|
||||
# Kolibri, upload2usb, and other apps can export & import channels to USB sticks/drive:
|
||||
usb_lib_writable_sticks: True
|
||||
|
||||
# Common UNIX Printing System (CUPS)
|
||||
cups_install: False
|
||||
|
|
|
@ -195,8 +195,8 @@ bluetooth_term_enabled: False
|
|||
# Show entire contents of USB sticks/drives (at http://box/usb)
|
||||
iiab_usb_lib_show_all: True
|
||||
# Set umask=0000 for VFAT, NTFS and exFAT in /etc/usbmount/usbmount.conf so
|
||||
# Kolibri can export & import channels to USB sticks/drive:
|
||||
usb_lib_umask0000_for_kolibri: True
|
||||
# Kolibri, upload2usb, and other apps can export & import channels to USB sticks/drive:
|
||||
usb_lib_writable_sticks: True
|
||||
|
||||
# Common UNIX Printing System (CUPS)
|
||||
cups_install: False
|
||||
|
|
|
@ -202,7 +202,7 @@ bluetooth_term_enabled: False
|
|||
iiab_usb_lib_show_all: True
|
||||
# Set umask=0000 for VFAT, NTFS and exFAT in /etc/usbmount/usbmount.conf so
|
||||
# Kolibri can export & import channels to USB sticks/drive:
|
||||
usb_lib_umask0000_for_kolibri: True
|
||||
usb_lib_writable_sticks: True
|
||||
|
||||
# Common UNIX Printing System (CUPS)
|
||||
cups_install: False
|
||||
|
|
Loading…
Add table
Reference in a new issue