Dietpi: Samba-Client creates file system owned by 'Dietpi' not 'Root'

Created on 23 Sep 2018  ·  7Comments  ·  Source: MichaIng/DietPi

Creating a bug report/issue:

Required Information:

  • DietPi version | 6.16
  • Distro version | 9.4
  • Kernel version |Linux DietPi 4.14.70-v7+ #1144 SMP Tue Sep 18 17:34:46 BST 2018 armv7l GNU/Linux
  • SBC device | RPi 3 Model B (armv7l)
  • Power supply used | (5v
  • SDcard used |patriot 8g

    Additional Information (if applicable):

  • Software title | (EG: Nextcloud)

  • Was the software title installed freshly or updated/migrated?
  • Can this issue be replicated on a fresh installation of DietPi?
  • dietpi-bugreport ID

Steps to reproduce:

  1. ...connect to a network samba share using the config-manager
  2. ...ip, name, owner, pw, pw, samba file destination [ok].....

Expected behaviour:

  • ...Normally it creates a folder owned by root with permissions for all users

Actual behaviour:

  • ...created a file share with owner as dietpi
    sambaissue

Extra details:

  • ...
Bug Question

All 7 comments

@dynobot
Thanks for your report.

This is the expected behaviour since v6.16. We changed it to allow other software titles access the samba mount, e.g. music players to access shared music folder, downloaders to move their files into shared download folder and such.

Since root still has full access, this should not cause any issues, or do you face any related issue?

Yes the issue I am having is when I use MPD it can not access the files. MPD runs under user mpd and is only in the group 'audio'. When I run MPD as user dietpi, I have no problems accessing the files -but- myMPD points to user mpd running MPD. If you want to change samba-client to use dietpi instead of root then MPD needs to be in the same group. Looks like dietpi user does not share to 'all users' with permissions. BTW, I never had a problem sharing when root controlled the samba directories....root also had different permissions though, as it allowed read and execute permissions to all-users.

@dynobot

MPD runs under user mpd and is only in the group 'audio'
MPD needs to be in the same group

Ah, I see the issue.

Mount samba with 775

🈴 Not an option /mnt/dietpi_userdata/.mpd_cache, needs RW and 777 could be death.

Run MPD under DietPi group

🈯️

  • G_CONFIG_INJECT '^group ' 'group "dietpi"' /etc/mpd.conf
  • dietpi-services restart

@dynobot
Please try the above and let us know if this resolves the issue.

Okay that seemed to work. But how about giving dietpi the same permissions root had before?

Read and Execute privileges for all users.

That way all the other programs that might run under some 'other' user won't have this problem....just a thought.

@dynobot

Okay that seemed to work. But how about giving dietpi the same permissions root had before?

Would be nice, however, the issue is that dietpi-software installed software no longer runs as root (minus a few, eg: desktop). This is in an effort to increase "security" for our users.

So to allow access to networked dietpi-userdata, we must use the 'dietpi' group to ensure those programs can function:
https://dietpi.com/phpbb/viewtopic.php?f=11&t=4595#p14192

And samba doesnt support changing individual folder permissions, so this is the best solution we can provide at this time.

Okay then I guess dietpi it is...no worries.

Completed, resolved for v6.17.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Invictaz picture Invictaz  ·  3Comments

Fourdee picture Fourdee  ·  3Comments

Fourdee picture Fourdee  ·  3Comments

Fourdee picture Fourdee  ·  3Comments

1021683053 picture 1021683053  ·  3Comments