Read/Write access denied with mounted drives?

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
WarHawk
Posts: 610
Joined: Thu Jul 20, 2017 8:55 am

Re: Read/Write access denied with mounted drives?

Post by WarHawk »

Cool...so mounting it with the file_mode=0770,dir_mode=0770 sets it for read/write by non-root users?

Glad you guys showed up...I was at a complete loss
User avatar
finch_6
Posts: 33
Joined: Tue Sep 04, 2018 7:21 pm

Re: Read/Write access denied with mounted drives?

Post by finch_6 »

@MichaIng,

You are a super star! Thanks so much!! Worked perfectly. Back to a working setup again :) :)


Also a huge thank you to you @WarHawk for your help...

Failing the above, i'll give you information in regards to setting the run-level user for those applications to root (which will make some "security" aware users cry :))
Thanks @Fourdee for having the work around on standby!!
DietPi on a Raspberry Pi 3 B+ running:
- Sonarr
- Deluge
- Jackett
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Read/Write access denied with mounted drives?

Post by MichaIng »

WarHawk wrote: Mon Sep 17, 2018 5:47 am Cool...so mounting it with the file_mode=0770,dir_mode=0770 sets it for read/write by non-root users?

Glad you guys showed up...I was at a complete loss
It allows r/w access for all users of the dietpi group, which includes all the software run users that we recently switched from root to their own separate ones for security reasons.

To allow r/w for really all users, 0777 modes would be needed, but this would break the security efforts ;).

Glad it works now. We will implement this as default for samba mounts via dietpi drive manager.

For those who use NFS mounts:
As long as the nfs servers file system supports permissions, you can apply them as usual via chown/chmod on server and client vice versa. I am going to test how to solve it, if the server does not support permissions.
pyro2677
Posts: 1
Joined: Tue Oct 23, 2018 12:42 am

Re: Read/Write access denied with mounted drives?

Post by pyro2677 »

I'm having the same issue and i have spent 10+hours over the last few days trying to get this sorted.
Had 6.14 everything was working as it should, updated to 6.16 and everything stopped working and i mean EVERYTHING. Dietpi wasn't even loading after the update. Reinstalled Dietpi onto my Odroid C2, it auto updated to 6.16 and then install all my programs again. Orginally i had plex.cred and this is how my fstab has been and working without issues before update.
#Please use DietPi-Drive_Manager to setup network mounts
//192.168.XX.XXX/video /mnt/samba cifs auto,defaults,nofail,credentials=/etc/plex.cred,uid=plex 0 0
//192.168.XX.XXX/music /mnt/samba_2 cifs auto,defaults,nofail,credentials=/etc/plex.cred,uid=plex 0 0
//192.168.XX.XXX/photo /mnt/samba_3 cifs auto,defaults,nofail,credentials=/etc/plex.cred,uid=plex 0 0

all 3 folders worked with qbittorrent, sonarr and Plex, mounts are on a synology NAS 6.14 i had to create a plex user to get it working. Sonarr and Qbittorrent ran without issue.

Installed 6.16 tried adding a new series then the problems started with Qbit starting D/L and then stopping them or running at 800bps - 1Kbps or not downloading at all and Sonarr would not rename files. Diving deeper it said not access to folder, added download station to the downloads client and ran full speed and downloaded files, however Sonarr couldn't move them.

I have tried setting up a new sonaar user in Synology Nas and giving it all the permissions the same as Plex but no luck. I have tried new permissions and changing permissions both in webmin and nas and still would not work. Changed folders to windows ACL still not accessed via Dietpi side. Made new folder on the NAS and moved Tv Shows to this new folder and still no go. Changed on dietpi side to dietpi:dietpi 0777,0775,0755 changed to plex:dietpi and still nothing. Also have tried changing the 0770 now on the mounts and nothing is changing anymore, staying at 0777.

Installed Sonarr on synology gave Sonarr sc-nzbdrone permission to the folder and boom everything working again as it should via the NAS side. There is something that has changed in Dietpi that is not working since the change.
Jargin
Posts: 1
Joined: Wed Dec 05, 2018 5:09 am

Re: Read/Write access denied with mounted drives?

Post by Jargin »

I'm lazy and went back to running as root. NFS share doesn't allow client side uid/gid settings.

In /etc/systemd/system/sonarr.service comment out the User and Group lines:

Code: Select all

[Unit]
Description=Sonarr (NzbDrone) Daemon
After=network.target

[Service]
#User=sonarr
#Group=dietpi
Type=simple
ExecStart=/usr/bin/mono -O=-aot /opt/NzbDrone/NzbDrone.exe -nobrowser -data=/mnt/dietpi_userdata/sonarr

[Install]
WantedBy=multi-user.target
Reload the service settings:

Code: Select all

systemctl daemon-reload
Restart the service:

Code: Select all

service sonarr restart
Post Reply