Add permissions to OSMC user on LAN

Hi, I have Rpi4 with Dietpi and OSMC on Rpi3 installed. When I go to shared folder from OSMC I cannot delete files on my dietpi_usrerdata folder. Can I add permissions to my OSMC user and how to do it Wright?
Regards Przemek

Hi,

How did you mount the shared folder between your DiePi system and the OSMC system?

I mount in Kodi file manager as NFS://mnt/Toshiba/dietpi_userdata.

so you are exporting the file system on the RPi4 and going to mount it on the RPi3?

Exporting? On /mnt/Toshiba/dietpi_userdata/Video is my media library for Emby server on Rpi4. I just mount NFS network share in OSMC from there. I find option on OSMC forum to install autofs. Is it good idea?
Edit. I cannot also delete files when I login with FTP on Android or Nautilus.

So do you have an FTP Client installed on DietPi? Or Samba?
Within your OSMC device, is the mount done on OS level or on application level? means do you have an entry on /etc/fstab ?

I have FTP installed on Dietpi. But I think I have something wrong with permissions on my Toshiba (format etx4) drive because on my second drive My Passport I can delete files from FTP or SSH without sudo.

dietpi@DietPi:/mnt/Toshiba/dietpi_userdata$ ls -l
razem 24
drwxrwxr-x 5 dietpi   dietpi   4096 mar 21 22:02 downloads
drwxrwxr-x 2 dietpi   dietpi   4096 mar 20 15:31 Music
drwxrwxrwx 5 www-data www-data 4096 mar 22 20:19 mysql
drwxr-x--- 6 www-data www-data 4096 mar 22 16:41 nextcloud_data
drwxrwxr-x 2 dietpi   dietpi   4096 mar 19 14:01 Pictures
drwxrwxr-x 4 dietpi   dietpi   4096 mar 21 17:52 Video

On My Ppassport storage every foldr is for root.

What user do you use to connect with FTP? Which FTP server you installed?

I cannot login ftp with root so only dietpi user. I install ProFTP.

ok if you use user dietpi, you should be able to create, modify and delete all folder that are owned by dietpi user

Means in your case, the following folder should be accessible via FTP:

drwxrwxr-x 5 dietpi   dietpi   4096 mar 21 22:02 downloads
drwxrwxr-x 2 dietpi   dietpi   4096 mar 20 15:31 Music
drwxrwxr-x 2 dietpi   dietpi   4096 mar 19 14:01 Pictures
drwxrwxr-x 4 dietpi   dietpi   4096 mar 21 17:52 Video

which of the folders you like to access modify?

Yes, that is correct but when I login with FTP I cannot. That is also when I login with SSH. I must use sudo. Maybe it’s because I format that drive from my linux laptop. I also add permissions for www-data user and dietpi user. Maybe I made it wrong. I’m not good at that stuff :confused:

pls can you login using FTP and try to create a folder? How does the user permissions of this looks like afterwards?

As I say I cannot create, delete folders when login with ftp or ssh on that drive.

pls can you login using FTP port 21. You are going to login directly to your DietPi system right?

The same situation:

can you post output of following

la -la /mnt/Toshiba/

I give permissions for whole Toshiba HDD for www-data, maybe that is the reason?

dietpi@DietPi:/$ ls -la /mnt/Toshiba/
razem 28
drwxr-xr-x 4 www-data www-data  4096 mar 20 21:45 .
drwxr-xr-x 8 root     root      4096 mar 21 08:11 ..
drwxrwxrwx 8 www-data www-data  4096 mar 20 20:23 dietpi_userdata
drwx------ 2 www-data www-data 16384 mar 18 16:26 lost+found

as I can see you give permission 777 (r/w to everybody) to dietpi_userdata. Did you have done this now? Because on a screen shot before it was looking different. There it was user www-data only who could write to this folder

I give permissions when I install nextcloud. I didn’t change it now.

I would give permission to user dietpi. www-data should be fine for nextcloud folder only. No need to give it to entire user_data directory