dietpi-software changes folder ownership Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
User avatar
johnvick
Legend
Posts: 653
Joined: Wed Jun 08, 2016 10:53 am
Location: New Zealand

dietpi-software changes folder ownership

Post by johnvick » Sat Apr 27, 2019 11:28 pm

I'm using XU4 and dietpi v 6.22.3. I have moved dietpi-userdata folder to /home/john as all my systems are setup this way.

I have a folder /home/john/camera that's owner is camera - this folder receives photos from a security camera on another device by an ncftp command.

I reinstalled pihole yesterday and in the process dietpi-software changed ownership of the /home/john/camera folder to dietpi, the result being the photos were not received.

I noticed this before on earlier versions of dietpi. I'm not sure why installing software should change the ownership of an unrelated folder?

John

User avatar
MichaIng
Legend
Posts: 1626
Joined: Sat Nov 18, 2017 5:21 pm

Re: dietpi-software changes folder ownership

Post by MichaIng » Sun May 26, 2019 4:23 am

@johnvick
DietPi-Software currently does this after every install, jep. This was meant to be a failsafe step as many software titles are installed in dietpi_userdata and/or require access to the contained media/data directories. But I want to change that as well, since it causes more issues than it might solve, especially overrides custom permissions: https://github.com/MichaIng/DietPi/issues/2641

Currently best solution is to always use dietpi user or at least group to access dietpi_userdata. Every user inside the dietpi group has R/W access already.

Just not that dietpi_userdata is not an "unrelated" dir in this sense. Custom sub directories indeed should be allowed to have custom permissions without being overwritten, but the base dir requires dietpi:dietpi 775 permissions.

User avatar
MichaIng
Legend
Posts: 1626
Joined: Sat Nov 18, 2017 5:21 pm

Re: dietpi-software changes folder ownership

Post by MichaIng » Sat Aug 10, 2019 4:26 pm

Userdata permissions overwrite has been removed, currently in dev code: https://github.com/MichaIng/DietPi/pull/3040

User avatar
johnvick
Legend
Posts: 653
Joined: Wed Jun 08, 2016 10:53 am
Location: New Zealand

Re: dietpi-software changes folder ownership

Post by johnvick » Sun Aug 11, 2019 9:25 am

Thanks I've been waiting for this fix for a long time :)

Post Reply