Streaming from SMB Permissions bug?
#1
Question 
Hey guys, my xbmc install refuses to play certain files from my smb server. It seems to be a permissions issue, but no other computer or device has the same problem. It seems that files owned by the user monsoon are unplayable, but files owned by the user joshua are fine.

The xbox is logged in as the smb guest account, like any other device.

The server is OpenSolaris snv_134, the files that wont play are owned by monsoon, with 775 equivalent permissions:
Code:
joshua@Proto:/storage/media/_New/torrents/complete/public tv$ /usr/bin/ls -V \[DB\]_Bleach_271_\[5FF99426\].avi
-rwxr-xr-x+  1 monsoon  other    178387768 May 19 23:28 [DB]_Bleach_271_[5FF99426].avi
                 owner@:rwxpdDaARWcCos:------I:allow
                 group@:r-x---a-R-c---:------I:allow
              everyone@:r-x---a-R-c---:------I:allow
           user:monsoon:rwxpdDaARWc--s:------I:allow
joshua@Proto:/storage/media/_New/torrents/complete/public tv$ ls -la \[DB\]_Bleach_271_\[5FF99426\].avi
-rwxr-xr-x+ 1 monsoon other 178387768 2010-05-19 23:28 [DB]_Bleach_271_[5FF99426].avi

Here is the debug log from xbmc showing a file owned by monsoon that is unable to be played:
Code:
23:38:07 M: 41345024   DEBUG: file:smb://guest:[email protected]/media/_New/torrents/complete/public tv/[DB]_Bleach_271_[5FF99426].avi IsDVDImage:0 IsDVDIfoFile:0
23:38:07 M: 40820736    INFO: mplayer play:smb://guest:[email protected]/media/_New/torrents/complete/public tv/[DB]_Bleach_271_[5FF99426].avi cachesize:2048

## Checks for subtitles here.

23:38:07 M: 34934784   DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://guest:guest@10%2e0%2e0%2e2/media
23:38:07 M: 34934784   DEBUG: CFileSMB::Open - opened media/_New/torrents/complete/public tv/[DB]_Bleach_271_[5FF99426].avi, fd=-1
23:38:07 M: 34934784    INFO: FileSmb->Open: Unable to open file : 'smb://guest:guest@10%2e0%2e0%2e2/media/%5fNew/torrents/complete/public%20tv/%5bDB%5d%5fBleach%5f271%5f%5b5FF99426%5d%2eavi'
                                            unix_err:'d' nt_err : 'c0000022' error : 'Access denied'
23:38:07 M: 34934784    INFO: Using -subcp enca:__:CP1252 to detect the subtitle charset
23:38:07 M: 34934784    INFO: Flipping bi-directional subtitles disabled

## a heap of mplayer config output here

23:38:07 M: 34566144   DEBUG:   msg: get_path('font/font.desc') -> 'Q:\system\players\mplayer\font/font.desc'
23:38:07 M: 34037760   DEBUG:   msg: font: can't open file: Q:\system\players\mplayer\font/font.desc
23:38:07 M: 34037760   DEBUG:   msg: font: can't open file: Q:\system\players\mplayer/font/font.desc
23:38:07 M: 34566144   DEBUG:   msg: Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
23:38:07 M: 34533376   DEBUG:   msg: Using XBOX High Resolution Timers for timing
23:38:07 M: 34533376   DEBUG:   msg: get_path('input.conf') -> 'Q:\system\players\mplayer\input.conf'
23:38:07 M: 34533376   DEBUG:   msg: Parsing input config file Q:\system\players\mplayer\input.conf
23:38:07 M: 34521088   DEBUG:   msg: Input config file Q:\system\players\mplayer\input.conf parsed: 50 binds
23:38:07 M: 34521088   DEBUG:   msg: mplayer_open_file(smb://guest:[email protected]/media/_New/torrents/complete/public tv/[DB]_Bleach_271_[5FF99426].avi)
23:38:07 M: 34521088   DEBUG:   msg: get_path('[DB]_Bleach_271_[5FF99426].avi.conf') -> 'Q:\system\players\mplayer\[DB]_Bleach_271_[5FF99426].avi.conf'
23:38:07 M: 34521088   DEBUG:   msg:
                                            Playing smb://guest:[email protected]/media/_New/torrents/complete/public tv/[DB]_Bleach_271_[5FF99426].avi.
23:38:07 M: 34521088   DEBUG:   msg: find subtitles
23:38:07 M: 34521088   DEBUG:   msg: auto open Z:\subtitle
23:38:07 M: 34521088   DEBUG:   msg: Filename for url is now smb://guest:[email protected]/media/_New/torrents/complete/public%20tv/%5BDB%5D_Bleach_271_%5B5FF99426%5D.avi
23:38:07 M: 34521088   DEBUG:   msg: protocol:smb
23:38:07 M: 34521088   DEBUG:   msg: use standard file for protocol:smb
23:38:07 M: 34521088   DEBUG:   msg: Option stream url: This URL doesn't have a username part.
23:38:07 M: 34521088   DEBUG:   msg: Option stream url: This URL doesn't have a hostname part.
23:38:07 M: 34500608   DEBUG:   msg: WINSOCK2 init: 0
23:38:07 M: 34500608   DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://guest:guest@10%2e0%2e0%2e2/media
23:38:07 M: 34500608   DEBUG: CFileSMB::Open - opened media/_New/torrents/complete/public tv/[DB]_Bleach_271_[5FF99426].avi, fd=-1
23:38:07 M: 34500608    INFO: FileSmb->Open: Unable to open file : 'smb://guest:guest@10%2e0%2e0%2e2/media/%5fNew/torrents/complete/public%20tv/%5bDB%5d%5fBleach%5f271%5f%5b5FF99426%5d%2eavi'
                                            unix_err:'d' nt_err : 'c0000022' error : 'Access denied'
23:38:07 M: 34500608   DEBUG:   msg: File not found: 'media/_New/torrents/complete/public tv/[DB]_Bleach_271_[5FF99426].avi'
23:38:07 M: 34521088   DEBUG:   msg: Failed to open smb://guest:[email protected]/media/_New/torrents/complete/public tv/[DB]_Bleach_271_[5FF99426].avi.
23:38:07 M: 34521088   DEBUG:   msg: unable to open stream
23:38:07 M: 34521088   ERROR: CMPlayer::OpenFile smb://guest:[email protected]/media/_New/torrents/complete/public tv/[DB]_Bleach_271_[5FF99426].avi failed with code 0
23:38:07 M: 34521088  NOTICE: CMPlayer::CloseFile()
23:38:07 M: 34521088   DEBUG:   msg:  mplayer_close_file()
23:38:07 M: 34521088   DEBUG:   msg:
23:38:07 M: 34521088   DEBUG:   msg:  uninit_player
23:38:07 M: 34902016   DEBUG:   msg:  uninit_player - done
23:38:07 M: 34902016   DEBUG: Freeing FS segment @ 0x8f8450
23:38:07 M: 34902016  NOTICE: CMPlayer::CloseFile()
23:38:07 M: 34902016   DEBUG: Q:\system\players\mplayer\mplayer.dll (base 01600000): Detected memory leaks: 15 leaks
23:38:07 M: 34902016   DEBUG: leak caller address 016010CC, size      128, counter 1
23:38:07 M: 34902016   DEBUG: leak caller address 0160DFD0, size        4, counter 1
23:38:07 M: 34902016   DEBUG: leak caller address 0160E1A5, size       40, counter 1
23:38:07 M: 34902016   DEBUG: leak caller address 0160E279, size       72, counter 2
23:38:07 M: 34902016   DEBUG: leak caller address 0160E46B, size        8, counter 1
23:38:07 M: 34902016   DEBUG: leak caller address 0160E483, size        0, counter 1
23:38:07 M: 34902016   DEBUG: leak caller address 0161D439, size        0, counter 5
23:38:07 M: 34902016   DEBUG: leak caller address 016230D6, size        0, counter 1
23:38:07 M: 34902016   DEBUG: leak caller address 016230FB, size        0, counter 1
23:38:07 M: 34902016   DEBUG: leak caller address 01623121, size        0, counter 1
23:38:07 M: 34902016   DEBUG: mplayer.dll: Total bytes leaked: 252
23:38:07 M: 40787968   DEBUG: CApplication::OnPlayBackStopped - Playback was stopped
23:38:07 M: 40787968   ERROR: Playlist Player: skipping unplayable item: 0, path [smb://guest:[email protected]/media/_New/torrents/complete/public tv/[DB]_Bleach_271_[5FF99426].avi]
23:38:07 M: 40787968   DEBUG: Playlist Player: no more playable items... aborting playback
23:38:07 M: 40812544  NOTICE: CMPlayer::CloseFile()
23:38:07 M: 40828928   DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://guest:guest@10%2e0%2e0%2e2/media/%5fNew/torrents/complete/public%20tv
23:38:09 M: 40808448    INFO: XCURL::DllLibCurlGlobal::CheckIdle - Closing session to http://feeds.feedburner.com (easy=00D1B010, multi=00C8CB80)
23:38:10 M: 41435136    INFO: XCURL::DllLibCurlGlobal::CheckIdle - Closing session to http://xoap.weather.com (easy=00C5C010, multi=00CE7D90)

Does anyone have any idea what could be the issue here? im pretty stumped.
#2
While I'm no Linux guru, perhaps a quick primer on how SMB permissions work under Windows will shed some light on the matter?

The file system is typically NTFS, under which files have an owner, and a list of users/groups who have read/write/execution rights (one of these groups can be "Everyone"). Administrators may "take" ownership of any file they wish, then change the permissions as they see fit (but they can't "give" ownership back, so if such tampering is performed, it's pretty obvious).

On top of the filesystem permission scheme, you've got SMB permissions, which are assigned in much the same way as NTFS permissions but are treated separately. To access files via the Guest account, the Everyone group must have access to the files in concern.

Usually, receiving an outright "access denied" error (instead of a "please try to login again"-type message) would indicate that the SMB permissions are ok, but the file system permissions are out of whack.

Given that your other systems are accessing all files with no problem, it might be worth checking what username and password they're using to login with.
XBMC Manual - BlackBolt - SVN Guide - Skin SVN - Wide Icon SVN - ROM Shortcut Generator
You're just jealous 'cause the voices only talk to me :P
#3
I run a linux based QNAP file server. I've noticed that when some files are modified or transferred by/from a windows based machine permissions can get messed up. And the xbox seems most susceptible to this.

I periodically run a script to reset permissions on the server.

Can you go to a directory and run [b]ls -l[/] to show file permissions and post the output?

If I have helped you in any way, please forgive me, it was entirely accidental.

Logout Mark Read Team Forum Stats Members Help
Streaming from SMB Permissions bug?0