Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Skip setting file permissions globally after each install #3040

Merged
merged 33 commits into from
Aug 10, 2019

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Aug 6, 2019

Status: testing

  • DietPi-Set_software

Fixes: #2641

Commit list/description:

  • DietPi-Software | Skip "/DietPi/dietpi/func/dietpi-set_software setpermissions" to not overwrite user custom permissions and probably other software permission modes that are more secure. Instead apply required permissions directly during individual software config step.
  • DietPi-Software | BaiKal: Handle reinstalls properly, replace the old instance but keep the old database/configs dir. Install and enable required PHP modules explicitly which allows us on long term to keep the default PHP install slim without additional modules installed by default.
  • DietPi-Software | Uninstall enhancements: Disable services before removing units, unmask in case they are not located in /etc, to have any related symlinks removed for cleaner uninstall. Add checks before removing files/dirs/users to avoid error messages.

+ DietPi-Software | Skip "/DietPi/dietpi/func/dietpi-set_software setpermissions" to not overwrite user custom permissions and probably other software permission modes that are more secure. Instead apply required permissions directly during individual software config step.
+ DietPi-Software | BaiKal: Handle reinstalls properly, replace the old instance but keep the old database/configs dir. Install and enable required PHP modules explicitly which allows us on long term to keep the default PHP install slim without additional modules installed by default.
+ DietPi-Software | Uninstall enhancements: Disable services before removing units, unmask in case they are not located in /etc, to have any related symlinks removed for cleaner uninstall. Add checks before removing files/dirs/users to avoid error messages.
MichaIng added 24 commits August 6, 2019 20:02
+ DietPi-Software | Remove setpermissions call since those are now applied within per-software config steps
+ DietPi-Software | MariaDB: In case of /var/lib/mysql symlink, the target dir needs to exist already. Permissions are applied by APT install automatically.
+ DietPi-Software | Lighttpd: Update perl comment according to quick test and changelog check
+ DietPi-Set_userdata | Skip re-setting permissions. Correct permissions are assured by "G_CHECK_FS_PERMISSION_SUPPORT" and "cp -a" and we should not overwrite any custom permissions set by either user or program installs.
+ DietPi-Patch | Apply encrypted PW file permissions only, instead of calling deprecated setpermissions command
+ DietPi-Set_software | Remove setpermissions function. Those are now applied on install for software titles individually. Aside from that we should never overwrite the whole userdata permissions which breaks user custom changes and implies possible security issues in some software cases.
+ DietPi-WiFi-Monitor | Spelling
+ DietPi-Justboom | Remove doubled newline
+ DietPi-LED_control | Remove doubled newline
+ DietPi-Benchmark | Remove doubled newline
+ DietPi-Morsecode | Remove doubled newline
+ DietPi-Cloudshell | Remove doubled newlines
+ DietPi-Software | HAProxy: Remove doubled newlines in service file
+ DietPi-Software | ProFTPd: Remove doubled newline in config file
+ DietPi-Software | LXDE: Remove doubled newline in OpenBox config file
+ DietPi-Software | CAVA: Remove doubled newlines, trailing spaces and do some spelling corrections in config file
+ DietPi-Login | dietpi.bash: Remove trailing space
+ DietPi-Pre-patch | Remove trailing space
+ DietPi-Globals | Remove trailing space
+ DietPi-Sync | Remove trailing newline
+ DietPi-Software | Remove trailing space and doubled newline
+ DietPi-Services | Remove trailing spaces
+ DietPi-Drive_Manager | Remove trailing spaces
+ DietPi-Autostart | Remove trailing space
+ config.txt | Remove trailing space
+ dietpi.txt | Remove trailing space
+ DietPi-PREP | Remove trailing space
+ CHANGELOG | DietPi scripts, i.e. dietpi-software, will not overwrite you custom permissions in /mnt/dietpi_userdata anymore
+ DietPi-Software | Failsafe "cp -a source/. target/" syntax to assure target is never created as file
+ DietPi-Software | Always use "cp -a" instead of "cp -R" to preserve permissions
+ DietPi-Software | chown user content dirs (but not contained data) on installs, so media and download software titles have file list and creation permissions.
+ DietPi-Software | Shorten array names: aSOFTWARE_WHIP_NAME => aSOFTWARE_NAME and aSOFTWARE_WHIP_DESC => aSOFTWARE_DESC
+ DietPi-Software | When looping through all existing software titles, loop through aSOFTWARE_NAME, as aSOFTWARE_INSTALL_STATE can have an old saved value from .installed even if the software title has been dropped from DietPi-Software.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant