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 | SABnzbd: Switch to user "dietpi"? #2172

Closed
MichaIng opened this issue Oct 24, 2018 · 6 comments
Closed

DietPi-Software | SABnzbd: Switch to user "dietpi"? #2172

MichaIng opened this issue Oct 24, 2018 · 6 comments

Comments

@MichaIng
Copy link
Owner

Ref: https://dietpi.com/phpbb/viewtopic.php?f=11&t=5175

Did we forget it or was there a reason to still run it as root?

Current systemd unit:
https://github.com/Fourdee/DietPi/blob/dev/dietpi/dietpi-software#L11319-L11329

cat << _EOF_ > /etc/systemd/system/sabnzbd.service
[Unit]
Description=sabnzbd DietPi
[Service]
Type=simple
ExecStart=/usr/bin/python /etc/sabnzbd/SABnzbd.py -f /etc/sabnzbd/sabnzbd.ini
[Install]
WantedBy=multi-user.target
_EOF_
@Fourdee
Copy link
Collaborator

Fourdee commented Oct 24, 2018

@MichaIng

Looks like it got missed 👍

Will make change, test and send commit if passes.

@Fourdee Fourdee self-assigned this Oct 24, 2018
Fourdee referenced this issue Oct 24, 2018
- DietPi-Software | Sabnzbd: Updated to 2.3.5 for new installations only. Also runs under its own limited user account: https://github.com/Fourdee/DietPi/issues/2172
@Fourdee
Copy link
Collaborator

Fourdee commented Oct 24, 2018

  • 🈯️ Install + GUI tests passed.
  • Just need to test actual nzb use.

@MichaIng
Copy link
Owner Author

MichaIng commented Oct 24, 2018

@Fourdee
Is there a possibility to force umask=0002 or 0007 as well, so other media software (+network shares/drives) have write access as well?

@Fourdee
Copy link
Collaborator

Fourdee commented Oct 24, 2018

root@DietPi:~# ls -lha /mnt/dietpi_userdata/downloads/complete/
total 12K
drwxr-xr-x 3 sabnzbd dietpi 4.0K Oct 24 14:59 .
drwxrwxr-x 6 dietpi  dietpi 4.0K Oct 24 14:59 ..
drwxr-xr-x 2 sabnzbd dietpi 4.0K Oct 24 14:59 18081905 test.nfo

@MichaIng

mask

Unable to find any entries matching 'mask' in /etc/sabnzbd/sabnzbd.ini, or in GUI pages


?

permissions = ""

https://sabnzbd.org/wiki/advanced/unix-permissions

@Fourdee
Copy link
Collaborator

Fourdee commented Oct 24, 2018

G_CONFIG_INJECT 'permissions =' 'permissions = "0775"' /etc/sabnzbd/sabnzbd.ini

download nzb

  • 🈯️
root@DietPi:~# ls -lha /mnt/dietpi_userdata/downloads/complete/                 total 20K
drwxrwxrwx 5 sabnzbd dietpi 4.0K Oct 24 15:11 .
drwxrwxrwx 6 dietpi  dietpi 4.0K Oct 24 14:59 ..
drwxrwxr-x 2 sabnzbd dietpi 4.0K Oct 24 15:11 test.rar

Fourdee referenced this issue Oct 24, 2018
+ 775 permissions for sabnzbd downloads: https://github.com/Fourdee/DietPi/issues/2172
@Fourdee
Copy link
Collaborator

Fourdee commented Oct 24, 2018

so other media software has write access as well?

@MichaIng

done 775 for now, allows group r/w under dietpi, think we need 777?

777 Not required. Tested samba removal fine.

@Fourdee Fourdee closed this as completed Oct 24, 2018
@Fourdee Fourdee mentioned this issue Oct 25, 2018
Fourdee referenced this issue Oct 25, 2018
**v6.17**
(25/10/18)

**Changes / Improvements / Optimisations:**
 - General | NanoPC T4: Image updated to include lastest kernel (4.4.154). Many thanks to @carlosedp for providing this kernel! https://github.com/Fourdee/DietPi/issues/1829#issuecomment-429324437
 - General | DietPi now has 3 branches (master=stable, beta=public testing, dev=dev). By default, all users are on master/stable branch: https://github.com/Fourdee/DietPi/issues/2083#issuecomment-426842537
 - General | Improved detection of permissions support during user data transfers: https://github.com/Fourdee/DietPi/issues/2096
 - General | IPv6: Due to the requirements of various software titles available in dietpi-software (eg: nginx, redis-server), and that IPv6 is slowly becoming more common place, IPv6 is now disabled via sysctl on interface level, while it stays enabled on kernel level: https://github.com/Fourdee/DietPi/issues/2027
 - DietPi-Autostart | Chromium: You will now be prompted to enter a homepage URL, which will be loaded when the application starts: https://github.com/Fourdee/DietPi/issues/2169#issuecomment-432297343
 - DietPi-Config | RPi: Added support for LCD panel "Elecrow ESP01215E 7 inch HDMI IPS with touch input" (basically a cheaper RPi touchscreen): https://www.amazon.co.uk/gp/product/B07H79XMLT/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1
 - DietPi-Config | Added ability to benchmark network LAN transfer rates using 2 DietPi systems.
 - DietPi-Config | RPi: Changing the display resolution, will also apply to Chromium under kiosk/autostart mode: https://github.com/Fourdee/DietPi/issues/2158
 - DietPi-Config | Added an option to toggle preferring IPv4 connections with APT and wget, if IPv6 is enabled. This enhances compatibility and performance in some cases.
 - DietPi-Config | Online Benchmarks Database! Now available. Simply run the benchmark from the tools menu, to upload your scores and compare against others: https://dietpi.com/survey
 - DietPi-Automation | Added settings to dietpi.txt to toggle IPv6 and IPv4 preference on first boot.
 - DietPi-Update | You now have the option to view the changelog, prior to updating: https://github.com/Fourdee/DietPi/issues/2081
 - DietPi-Software | Sabnzbd: Updated to 2.3.5 for new installations only. Now runs under its own limited user account, and, umask of 0775 for downloads: https://github.com/Fourdee/DietPi/issues/2172
 - DietPi-Software | Card/CalDAV request redirection was added to new Baikal, ownCloud and Nextcloud installs. Now only the servers domain/IP need to be entered on Card/CalDAV clients, without any further path to the DAV endpoints: https://github.com/Fourdee/DietPi/issues/2057
 - DietPi-Software | Plex Media Server and Transmission services run now as group "dietpi", to allow cross access with download managers and media software: https://github.com/Fourdee/DietPi/issues/2067#issuecomment-427579779
 - DietPi-Set_Hardware | Odroid C2: When selecting USB DAC, smp affinity will be applied for USB IRQ's to improve stability: https://github.com/Fourdee/DietPi/issues/2101
 - DietPi-Drive_Manager | Formatting: Now has the option to format the whole drive, or patition only, for drives with existing partitions.
 - DietPi-Drive_Manager | Mounting NTFS drives now enabled native linux permissions support (eg: you can use this as your userdata location). Many thanks to @Random90 for making this possible! https://github.com/Fourdee/DietPi/issues/2096#issuecomment-425553333
 - DietPi-Drive_Manager | Improved detection and formatting for NVMe based drives: https://github.com/Fourdee/DietPi/issues/2102
 - DietPi-Drive_Manager | Removed /proc from fstab. No longer required as this created at kernel/systemd level: https://github.com/Fourdee/DietPi/issues/2154

**Bug Fixes:**
 - General | G_THREAD_START: Resolved issue where this was running in blocking mode. Now uses exit code to indentify finished tasks instead of PID.
 - DietPi-Cloudshell | Resolved various issues with inability to run service via SSH on another screen, and, G_DIETPI-NOTIFY errors. Many thanks to @potter-91 for reporting this issue! https://github.com/Fourdee/DietPi/issues/2104
 - DietPi-Config | WiFi-Monitor: Resolved an issue with syntax, and, incorrectly pinging the default gateway, instead of whats assigned to the wlan interface: https://github.com/Fourdee/DietPi/issues/2103
 - DietPi-Config | dietpi-wifi.db code has been optimized, and, also resolves an issue where '/var/lib/dietpi/dietpi-wifi.db' was not generated automatically: https://github.com/Fourdee/DietPi/issues/2087#issuecomment-423836528
 - DietPi-Config | Waveshare32b: Resolved inverted inputs under X11/Xorg: https://github.com/Fourdee/DietPi/issues/803
 - DietPi-Config | PineA64: HDMI sound is now correctly enabled when selected. 3.5mm support is still under investigation: https://github.com/Fourdee/DietPi/issues/2153
 - DietPi-Drive_Manager | Resolved an issue where swapfile would register as enabled when set to 0 size: https://github.com/Fourdee/DietPi/issues/2127
 - DietPi-Survey | Resolved an issue where dietpi-survey under mode 1 would not generate the survey file.
 - DietPi-Software | MPD: Now runs under the group 'dietpi' and user 'root', allowing access to music directories when contained on samba networked drives: https://github.com/Fourdee/DietPi/issues/2092
 - DietPi-Software | Fixed an issue where software uninstalls could have failed due to dependant packages. Thanks to @dynobot for reporting this issue: https://github.com/Fourdee/DietPi/issues/2091
 - DietPi-Software | Webservers/PHP: Fixed an issue, where PHP was not installed when a webserver was installed directly via "dietpi-software install 8X".
 - DietPi-Software | Nextcloud: On Jessie systems, no newer version than latest NC13 will be installed, because PHP5 support was dropped with NC14: https://github.com/Fourdee/DietPi/issues/1778#issuecomment-419918372
 - DietPi-Software | MyMPD: Resolved an issue where the service would fail to run: https://github.com/Fourdee/DietPi/issues/2088
 - DietPi-Software | MyMPD: Resolved an issue where the installation would fail, due to a recent MyMPD update with new pre-reqs: https://github.com/Fourdee/DietPi/issues/2088#issuecomment-423852124
 - DietPi-Software | SiCKRAGE: Resolved failing install due to changed capitalization of SiCKRAGE GitHub repo, and, various additional pre-reqs due to new install method required by SiCKRAGE. Thanks to @mdoary for reporting this issue: https://github.com/Fourdee/DietPi/issues/2126
 - DietPi-Software | VNC Server: Resolved an issue where VNC server would fail to start under shared desktop mode, many thanks to @LieDanG for reporting this issue: https://github.com/Fourdee/DietPi/issues/2142#issuecomment-430492281
 - DietPi-Process_tool | Resolved an issue where applying process settings on Plex Media Server failed, thanks to @symbios24 for reporting this issue: https://github.com/Fourdee/DietPi/issues/2089
 - General | Sparky SBC: Resolved an issue where 'sparky_eth_controller.sh' could incorrectly reboot the device after 20 seconds.
 - General | Resolved an issue with Rock64 being unable to run xserver. Please note this device still runs under limited software rendering due to lack of available working drivers/installation method for Debian systems: https://github.com/Fourdee/DietPi/issues/2086
 - General | Resolved an issue with Jessie failing to start networking with preboot script: https://github.com/Fourdee/DietPi/issues/2075

**Allo GUI v11:**
- Minor update to add GUI support for new DietPi version codes.

As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here.

**Known/Outstanding Core Issues:**
- O!MPD and MyMPD fail to update libaries. YMPD is fine: https://github.com/Fourdee/DietPi/issues/2156
- Kodi shutdown options missing: https://github.com/Fourdee/DietPi/issues/2155
- DietPi-Config | RPi | OpenGL/VC4 causes soundcard selection to be invalid: https://github.com/Fourdee/DietPi/issues/2173
- PineA64: No sound over 3.5mm jack: https://github.com/Fourdee/DietPi/issues/2153
- For all additional issues that may appear after release, please see the following link and select the 'Next Version Milestone' to see active tickets: https://github.com/Fourdee/DietPi/milestones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants