Permission denied when accessing SMB from raspberry pi

Hey guys,
I’d like to apologize in advance; i’m kind of a Linux noob.

So, I hooked up my external HDD to my Vero4k, works great. But I want to use my Raspberry Pi as a torrent box to download straight to the external HDD connected to my Vero4k.
I set up a SMB share and that works fine when I try to connect to it from my Windows PC; log in with osmc:osmc and i’m in, I can edit everything freely… but with my raspberry pi not so much. I’m able to mount the SMB drive and I can open everything just fine, but I don’t have any write permissions, it tells me “Permission Denied”.

I’ve used my limited knowledge to log into the drive through the Fstab, which i assume went well, since I can see all the folders/files. I’ve tried to chown/chmod 777 it through the Vero4k and the Pi but i cannot get it to work.

Thank you guys in advance!
If something’s not clear, please let me know!

Well let’s start with your fstab line you used on the Pi and also to confirm you use OSMC on the Pi or something else?

1 Like

Thanks for the quick reply!

FSTAB:

//192.168.0.116/media/HDD /media/HDD cifs username=osmc,password=osmc,defaults 0 0

I’m using OSMC on my vero4k, the pi runs debian, and i’d like to turn that into a torrentbox!

So do you have a user/group osmc/osmc on your pi?
Otherwise you may want to try to add uid=<local user>,gid=<local group> to your fstab.

I’ll try that when i get home from work tonight! Thanks again for your quick response!

I just tried running the following through the fstab:

//192.168.0.116/Externe\040HD /media/HDD cifs uid=112,gid=65534,defaults 0 0

It prompts Password for root@//192.168.0.116/HDD:

to which i tried entering both the pi’s password for root and the one for osmc. Either returns
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

You not only added the uid and gid but you also removed username and password. Why did you do that?

Edit: Please read these:

https://wiki.samba.org/index.php/Mounting_samba_shares_from_a_unix_client
https://wiki.archlinux.org/index.php/samba

I sure did, my bad!
I placed it back and it didn’t prompt for a password (as expected) but im not able to write on the HDD.

//192.168.0.116/HDD /media/HDD cifs uid=112,gid=65534,username=osmc,password=osmc,defaults 0 0