Permission denied accessing external HDD through SMB Rpi2B

Hi :slightly_smiling_face:,

I have a raspberry pi 2B that I have an external HDD (named hdd1) automatically mounted with my media on it.
As all my other computers are windows or mac I wanted to install the SMB server to enable me to upload new files to the hdd through SMB as the hdd is ext4.

After installing SMB server through the app store I can view the hdd as a share (hdd1) alongside the osmc directory as expected, however I seem to only have read only permissions when I attempt to copy new files accross as I get permission denied messages.

I have captured some debug logs here.

Any help or insights would be much appreciated :slightly_smiling_face:
Thanks

Login via SSH and check ownership and permissions.
Ownership should be osmc:osmc with permissions 770

Thanks @fzinken

Is this what you mean?

osmc@osmc:/media$ ls -l
total 8
drwxrwxrwx 4 osmc root 4096 Apr  6 20:25 HDD1

Kind of, what are the permission below HDD1, like ls -lah /media/HDD1/

osmc@osmc:~$ ls -lah /media/HDD1/
total 40K
drwxrwxrwx 4 osmc root  4.0K Apr  6 20:25 .
drwxr-xr-x 3 root root  4.0K Jun 22 11:46 ..
-rwxr--r-- 1 osmc osmc  6.1K Apr  6 20:06 .DS_Store
-rwxr--r-- 1 osmc osmc  4.0K Apr  6 12:57 ._.DS_Store
drwxrwsrwx 6 root users 4.0K Mar  3 11:16 Media
drwx------ 2 root root   16K Sep 18  2018 lost+found

Try sudo chown -R osmc:osmc /media/HDD1/

1 Like

Thanks for that. This is the output after running that:

osmc@osmc:~$ ls -lah /media/HDD1/
total 40K
drwxrwxrwx 4 osmc osmc 4.0K Apr  6 20:25 .
drwxr-xr-x 3 root root 4.0K Jun 22 11:46 ..
-rwxr--r-- 1 osmc osmc 6.1K Apr  6 20:06 .DS_Store
-rwxr--r-- 1 osmc osmc 4.0K Apr  6 12:57 ._.DS_Store
drwxrwsrwx 6 osmc osmc 4.0K Mar  3 11:16 Media
drwx------ 2 osmc osmc  16K Sep 18  2018 lost+found

So is it now working via SMB?

1 Like

Yes it is! :slightly_smiling_face:
Just tested creating a text file on the external drive through SMB and it works.

Thank you :smiling_face_with_three_hearts: