Folder permissions


First of all, sorry if this is not the correct sub-forum to ask this question, and even more if this question has been asked before —I searched, lightly, and I couldn’t find anything that really helped me— or if this is a really stupid question, but I’m a little noob on Linux permissions.

I have DietPi installed on a Cubox-i and it’s working really great. I have attached to the device a 1TB hard drive where I have a /Media folder that I want use for Radarr, Sonarr and Lidarr and share it over the network with Samba.

Trying to make things right —or as I guess should be right— my idea was to give granulate permissions to different users for different purposes. I created a user for the that specific Samba share mediashare and put that user with the lidarr, sonarr and radarr users on the group users that owns the those folders that I want to share and give permissions to those folder with:

$ chmod -R 764 /mnt/drive/Media

Radarr keep telling me that it isn’t able to write on that folder and when I use samba with the mediashare user I can’t delete or write anything.

I’m probably missing something here, but I really don’t know what.

I have installed Webmin and sometimes I manage things with its web interface. For example, I setup Samba with it.

Thanks for the help before hand.

PS1/ How do you format inline code in this forum?

PS2/ Does my issue have something to do with this?


I really know that mine is a really stupid question that doesn’t have to do anything specifically with DietPi —or it does— but I really don’t know how to proceed or fix my problem.

So if anyone is able to point me in the right direction I really appreciated.

Note that directories need execute permissions to be accessible (file listing), hence chmod -R 775 should work instead.
Best would be to leave non-execute permissions for files:

find /mnt/drive/Media -type d | xargs chmod 775
find /mnt/drive/Media -type f | xargs chmod 664

And for Sonarr, Radarr, downloaders write access, apply dietpi group to everything initially:

chown -R :dietpi /mnt/drive/Media

We configured the programs systemd units a way that they create files with dietpi group and 775/664 permissions themselves as well, hence cross access permissions should be assured.

Ok…. I’ve changed permissions so everyone has permissions for execute. However, there is something else:

root@Cubox-i:/mnt/OpL1TB/Media# ls -ahl
total 80K
drwxrwsr-x+   5 root dietpi 4.0K Nov 23 22:19  .
drwxrwsr-x+   7 root users  4.0K May 13  2019  ..
-rw-rw-r--+   1 root dietpi 4.0K Feb 19  2018  ._.apdisk
-rw-rw-r--+   1 root dietpi  291 Feb 19  2018  .apdisk
-rw-rw-r--+   1 root dietpi 4.0K Feb 17  2018  ._.DS_Store
-rw-rw-r--+   1 root dietpi  15K Nov 23 21:55  .DS_Store
drwxrwsr-x+ 160 root dietpi  12K Nov 23 22:12  Movies
drwxrwsr-x+   4 root dietpi 4.0K Feb 22  2018  Music
drwxrwsr-x+  11 root dietpi 4.0K Jun  1 08:26 'TV Shows'
root@Cubox-i:/mnt/OpL1TB/Media# groups radarr
radarr : radarr users dietpi mediashare

After rebooting, radarr still telling me that it can’t write in the folder Movies.

I’ve transformed Armbian to DietPi, perhaps does it have something to do with that?

i think that this has the same reason… :thinking:

Is radarr user (user running radarr application) in the “dietpi” group?

Yeah user “radarr” needs to be in the “dietpi” group: usermod -aG dietpi radarr
However this is done on install, respectively the systemd unit starts force forced “dietpi” primary group.

I guess it is this issue:
Is the drive some FAT variant or NTFS or another file system with no native UNIX permissions? From mono v6 on, when you follow the issue above and further links to mono project, file copy to such file systems fails, regardless of actual permissions. chown/chmod commands must work (as an easy check), hence all FAT+exFAT file systems do not work with mono currently :frowning:.


Just for the record. Seems that the problem was that was using dietpi in a Cubox-i, with an armbian transformed to dietpi.

I changed everything to a raspberry pi I have and no problem at all.

Seems that I need to retire that cubox or just to use it for something really light using armbian because the problem was either the cubox itself, the sd card or the transformation to dietpi.

Anyhow, thanks a lot for the help.