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 #2641

Closed
JJGO opened this issue Mar 18, 2019 · 5 comments
Closed
Milestone

Comments

@JJGO
Copy link

JJGO commented Mar 18, 2019

Every time I reboot the machine the permissions on /mnt/dietpi_userdata/dokuwiki are reset from www-data:dokuwiki to dietpi:dietpi.

I need the folder to have user www-data for the web server to edit files and the group to include other users such as the syncthing daemon.

I could automate the permission change on startup but my question is why is this happening and if it is expected behavior.

Thank you

Required Information

  • DietPi version | cat /DietPi/dietpi/.version
#!/bin/bash
G_DIETPI_VERSION_CORE=6G_DIETPI_VERSION_SUB=21
G_DIETPI_VERSION_RC=1G_GITBRANCH=master
G_GITOWNER=Fourdee
  • Distro version | echo $G_DISTRO_NAME or cat /etc/debian_version
9.8
  • Kernel version | uname -a
Linux Nal 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
  • SBC device | echo $G_HW_MODEL_DESCRIPTION or (EG: RPi3)
RPi 3 Model B+ (armv7l)
  • Power supply used | (EG: 5V 1A RAVpower)
    5V 2.4A Official Raspberry Pi
  • SDcard used | (EG: SanDisk ultra)
    SanDisk 32GB
@MichaIng
Copy link
Owner

@JJGO
Many thanks for your report.

Nope permissions reset on user data is not expected on reboot, only when doing a dietpi-software install. But we are already thinking to skip that as well.

Could you please paste:

cat /DietPi/dietpi/.install_stage
cat /boot/dietpi/.install_stage
lsblk -f

@JJGO
Copy link
Author

JJGO commented Mar 18, 2019

I see, I correlated with the wrong thing then. Pretty much all my reboots were triggered from some install so it makes sense. I tested and a single reboot does not change permissions.

The output is

$ cat /DietPi/dietpi/.install_stage
2
$ cat /boot/dietpi/.install_stage
2
$ lsblk -f
NAME        FSTYPE LABEL  UUID                                 MOUNTPOINT
mmcblk0                                                        
├─mmcblk0p1 vfat   boot   5DB0-971B                            /boot
└─mmcblk0p2 ext4   rootfs 060b57a8-62bd-4d48-a471-0d28466d1fbb /

Is there a way to tell dietpi-software to skip some folders when reseting permissions on install?

@MichaIng
Copy link
Owner

@JJGO

I see, I correlated with the wrong thing then. Pretty much all my reboots were triggered from some install so it makes sense. I tested and a single reboot does not change permissions.

Ah okay yes then this is expected. Currently there is no way to skip this, besides manually editing the script. But this would be reset on update etc. so I think currently your best way is to re-set permissions on boot.

However I will turn this issue into a feature request to skip setting permissions for the whole user data dir on each dietpi-software install, but instead set them individually only for the dirs/files required for the currently installed software title.

@MichaIng MichaIng changed the title Permissions on /mnt/dietpi_userdata reset after reboot DietPi-Software | Skip setting file permissions globally after each install Mar 18, 2019
@MichaIng
Copy link
Owner

Another vote for this by John: https://dietpi.com/phpbb/viewtopic.php?f=11&t=5866

@MichaIng
Copy link
Owner

MichaIng commented Aug 6, 2019

PR merged into dev: #3040

@MichaIng MichaIng added Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible. Testing/testers required 🔽 Solution available 🥂 Definite solution has been done and removed Priority 🔆 Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible. labels Aug 10, 2019
@MichaIng MichaIng mentioned this issue Sep 16, 2019
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