Kodi Community Forum

Full Version: Operation not permitted SMB Server 20012 R2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hi all, checking to see if anyone else has seen this error before. There is another post over on the OpenELEC site there about this (posted there as well). I have tried on OpenELEC and now XBian both with the same results, when trying to get to the SMB on one of my Windows Server 2012 R2 servers I get an error box that pops up saying "Operation not permitted" there is no other message. I have tried on another box (my Active Directory box) which is also 2012 R2 and a Windows 8.1 box with no issues. Its odd, because all of my other Media Centers (running Windows 7, 8.1) have no issues seeing this server, only the Raspberry Pi. Anyone have any suggestions?

Thanks in advanced!
You are not alone....I'm new to the Raspberry Pi and XBMC so stuggling with not being familiar with its operation. I have a Windows 2012 r2 server with all my music, video and picture files in shares. The shares require a valid account.

I managed to get a share connected for the Video and Music (with user name and password) however when I tried to connect the Pictures share got the "Operation not permitted" error. Went back to try the Video & Music folders and they too now produce the error. Everything I try now to connect to the shares fails with the error. If I browse the network I can see the Workgroup and my server but any attempt to browse the server to select a share brings up the error. Scrathing my head on this one.

Did you manage to resolve your problem?
Could you use NFS instead? I do that on my WHS 2011 server.
I haven't been able to resolve my issue yet, I'll have to try installing the Server for NFS feature and see if the Pi can pick up the NFS share.
(2014-03-10, 15:19)Bobins Wrote: [ -> ]You are not alone....I'm new to the Raspberry Pi and XBMC so stuggling with not being familiar with its operation. I have a Windows 2012 r2 server with all my music, video and picture files in shares. The shares require a valid account.

I managed to get a share connected for the Video and Music (with user name and password) however when I tried to connect the Pictures share got the "Operation not permitted" error. Went back to try the Video & Music folders and they too now produce the error. Everything I try now to connect to the shares fails with the error. If I browse the network I can see the Workgroup and my server but any attempt to browse the server to select a share brings up the error. Scrathing my head on this one.

Did you manage to resolve your problem?
Possibly you're trying to log into different shares on the same server using different usernames and passwords ? The way Samba works (as far as I understand) is that all connections to the same server must use the same username and password - the SMB protocol doesn't allow the same client to simultaneously connect to one share on a server with one username and password and a different share on the same server with a different username and password. This applies between two windows boxes too.

Another potential issue is that the SMB browser in XBMC is not very reliable and it sometimes wont browse the share list of a server even though it can connect to the individual shares.

What I'd suggest is delete all the video sources in XBMC you've added for the server that is giving you problems and restart XBMC. When you try to add the shares back in, don't browse to them through SMB->workgroup etc, manually type:

smb://servername/sharename

Where servername is an IP address or hostname (IP address is more reliable so use it if the server has a static IP) and sharename is the name of the share you're trying to connect to. At this point it should prompt for a username and password so enter these in. Remember you need a username and password that has access permissions to ALL the shares and files within those shares.

(It's ok to specify sub folders within the same share with multiple video source entries - for example smb://servername/sharename/Movies and then smb://servername/sharename/TV Shows as separate source entries)

Add your next source pointing to the same server the same way - it shouldn't prompt you for a username and password this time, however if it does make sure you use the same one as before.

I had very similar problems to you (but not to a Windows server, to a Mac) and the above fixed it for me.
Thanks for the input. I've tried tweaking around with the sources.xml file and adding in the path both with and without UsernameTongueassword@Server

<source>
<name>TV Shows</name>
<path pathversion="1">smb://IPAddressOfServer/TV Shows/</path>
</source>

They have all ended up with the same result.

15:17:43 T:2801296464 NOTICE: Thread BackgroundLoader start, auto delete: false
15:17:44 T:2858808400 ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://IPAddressOfServer/TV%20Shows'
unix_err:'1' error : 'Operation not permitted'
15:17:45 T:3059716096 ERROR: GetDirectory - Error getting smb://IPAddressOfServer/TV Shows/
15:17:45 T:3059716096 ERROR: CGUIMediaWindow::GetDirectory(smb://IPAddressOfServer/TV Shows/) failed
15:17:45 T:2801296464 NOTICE: Thread BackgroundLoader start, auto delete: false

I'm starting to lean more towards this is some type of sharing setting on my Windows box that isn't playing nice with Samba. When I don't manually add the SMB share to sources and try and add it though the XBMC GUI it never prompts for a password, just gives me the Operation no permitted error. However, on my DNS/AD server it does prompt me and lets me see the NETLOGON and SYSVOL shares, I just don't know what is configured differently.
So i solved this today. After messing around with server 2012 r2 data center and coming across this same issue and racking my brain for two days i realized we all need to stop and read what is on the screen in windows. Go to your share, right-click and go to the sharing tab. at the bottom and I'm willing to bet that it says something to the effect of "People without a username and passwords for this computer can not access folder shares with everyone"

What that is saying is even though you told windows can share with everyone and no need to authenticate its still not allowed unless they authenticated previously.

This sounds really really dumb and i agree but to a server admin the term everyone is easier to use than adding a million security groups but still prevent someone from an outside element to access your data.

The Fix
go to Control Panel\Network and Internet\Network and Sharing Center\Advanced sharing settings at the bottom it says ALL Networks. expand that and change it to "turn off password protected file sharing" and BAM it works. no more operation not allowed and NFS shares work as well.
Not sure about server versions of windows but for desktop versions another option is to enable the guest user account, which is disabled by default.

Samba knows how to log in as a guest user and the guest user is a member of the "Everyone" security group.
(2014-07-06, 20:13)sgtwtf Wrote: [ -> ]So i solved this today. After messing around with server 2012 r2 data center and coming across this same issue and racking my brain for two days i realized we all need to stop and read what is on the screen in windows. Go to your share, right-click and go to the sharing tab. at the bottom and I'm willing to bet that it says something to the effect of "People without a username and passwords for this computer can not access folder shares with everyone"

What that is saying is even though you told windows can share with everyone and no need to authenticate its still not allowed unless they authenticated previously.

This sounds really really dumb and i agree but to a server admin the term everyone is easier to use than adding a million security groups but still prevent someone from an outside element to access your data.

The Fix
go to Control Panel\Network and Internet\Network and Sharing Center\Advanced sharing settings at the bottom it says ALL Networks. expand that and change it to "turn off password protected file sharing" and BAM it works. no more operation not allowed and NFS shares work as well.

Sadly no dice here. I'm trying to do SMB shares and even after doing this and also trying disabling the windows firewall I'm still getting the Operation Not Allowed. I am fully convinced this has to do with something on the share as the Domain controller that I have built has no issues at all and it is also a 2012 R2, I would be willing to bet whatever it uses to share out the Sysvol and other shares on it are wide open so machines can see it to connect to the Domain, I just have no idea what settings its using differently.
DBMandrake, your absolutely right, default in 2012 they disabled the guest account, its enabled on the Desktop OS. Once I went in and enabled it all was good. Now, that said, I'm not a fan of leaving it enabled on my server, anyone know how to change Samba to login as a different account, I have to admit my understand of Samba and the Unix OS is fairly limited so I'm not sure where or if its possible to change the default from guest to a Windows AD account.
In OSX (Mavericks) you must enable the guest account as shown in this thread. This allows SMB guest accounts to knock on the door and get in.

http://apple.stackexchange.com/questions...d-non-macs
It seems XMBC use the built-in Guest account to access the share volume list, but the server os rejected that request.

I've tow box with one running 2012 R2 and another running Windows 8.1. When access the R2's share, the same error. But if I enable the Guest account, which disable by default settings, and edit the share permission to allow guest access the volume, it will be OK.

But if I access the Win 8's share, XBMC will asked me for username and password. The guest account is disabled on Win 8.
Hi. Has anyone found a real solution to this problem? I'm having the exact same issue while using Windows Server 2012 R2. I also have several Windows 7 machines on my network. Every box (including the server) has the Guest account disabled. I can access every Windows 7 machine from my Android box running XBMC, but NOT the server. I get the stupid "Operation not permitted" error. I tried enabling the Guest account on the server and sure enough my XBMC can suddenly access everything. Leaving the Guest account enabled just so I can gain access through XBMC is out of the question. I'm not going to leave the network wide open, just so one badly coded app can access it.

Why is there no REAL solution to this problem? If you do a search, you'll find that the issue has been around for at least 6 months (probably even longer). Where are the developers? Why aren't they looking into fixing this issue? It's obviously a wide spread problem affecting a lot of people. They should be fixing long standing issues like this, instead of wasting time renaming the app and making the app more and more bloated by adding more garbage features.
(2014-12-19, 03:18)umbala Wrote: [ -> ]Has anyone found a real solution to this problem?

Yes. There's 2 possible solutions available.
A. Enable the guest account
B. Hire a programmer of your own to develop a fix that is to your liking.

Quote:Why aren't they looking into fixing this issue?

Why aren't you?
This is an open source project. If something about the software isn't to your liking, you are free to correct it yourself.

As to why "The devs" aren't doing anything, it's because the devs have zero responsibility to you or any other user. They're volunteers who use their skills and resources to do what they want to do, not what you want them to do. You have the ability to contribute just as they do.

Quote: They should be fixing long standing issues like this

And you should be thanking every person who has worked over the years to make all the parts that work well enough that you care so much when something doesn't work, not coming here like a blowhard who thinks he can order around people who have dedicated years of their lives to this project because he clicked a free download link.
(2014-12-19, 03:18)umbala Wrote: [ -> ]Why is there no REAL solution to this problem?

There is: get your configuration right!

Kodi cannot be held responisble for the way people configure their home networks - if any client cannot access a given share on whatever server, it's not up to Kodi to fix this, but to the user who wants the client to access the share he himslef has configured...

Btw: I have a Server 2012R2, 4x Win7, 2x Win8.1, 3x Android, 1x iOS and 2x RPi, no guest account enabled (seriously: don't! do! that!), local firewalls enabled where possible - and all clients are using the same shares and the same MySQL db. No magic in that...
Pages: 1 2 3