Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

file permissions are not working for XBMC

Featured Replies

I've recently transitioned from a NAS (DNS-323) to unraid.  My main machine is a Mac.  I had built up quite a library on the NAS, and I view the material from various XBMC boxes in the house - I have two AppleTV's running XBMC and one old Xbox running XBMC.  I believe I'm running fairly recent versions of XBMC on all... Babylon at least.

 

My old process was to rip to my Mac, then use Finder to drag and drop them onto my NAS.

 

When I commissioned the unraid server, I used telnet on the Mac to the unraid box, mounted the NAS from the unraid box, then used midnight commander to copy the directories of files from the NAS to the unraid server.  The net result was directories and files both with rwx-rx-rx (755) permissions.  

 

I have two main types of content: movies, which are raw VIDEO_TS-style rips, and TV shows, which are generally episode-based MKV or AVI files.

 

When I pointed my XBMC at the new unraid folders (add source, smb, etc), XMBC found all the movies but wasn't able to see most of the TV show files, though it did see the directories they were in.  In Library Mode, it didn't find any episodes to scan, though the shows were all listed.  In regular mode, when you viewed the source as just files, there were no files listed - that is, the directories were there, but appeared empty.  (Same is true for the VIDEO_TS folders - empty.)  But with telnet, I could see the files.

 

Oddly enough, I could play the movies.  I think since the scraper used the folder names, that was sufficient... and somehow XBMC played the non-viewable VOB files.  But I couldn't play any TV shows because neither the scraper nor the file browser could see the episode files - there was nothing to select.

 

A buddy of mine said that he had had to alter the file permissions to rw-r-r (644) for XBMC to see them.  I tried that, and it worked.  I could now see the files in browser mode and the scraper suddenly found them and added them to the Library view.

 

Now the question - why?

 

And for grins, I tried my new process, to see what the resulting file permissions would be: I ripped something on my Mac and copied it to unraid using the Finder.  This apparently resulted in file permissions of rwx-- (700).  That seems odd.  (The Mac permissions are listed in Get Info as RW/R/R on the source file.)  But - XBMC saw the file and the scraper picked it up.  So it appears to work.

 

But it seems flaky.  So, some questions:

 

1) what should file permissions be on unraid for XBMC scraper to work properly using SMB?

1a) Does the file type/extension matter?  I see some different behavior, I think, between .avi and .mkv files.

2) what about directory unix permissions - is 755 (rwx-rx-rx) best?

3) is there a way to set the default file permissions on files copied to unraid via SMB?

 

Bonus question: Do the Mac Finder ".DS_Store" files cause any grief for either unraid or XBMC?  (These files are created automatically by OSX when you view them with the Finder.)

 

Thanks.

I too use XBMC on several Macs, but haven't seen the problems you are seeing.  I have rebuilt my library several times ever since I transitioned to using unRaid.

 

As for the permissions issue, based on the way I copy the files over will determine how the permissions get set up, but XBMC has always seen them.  I first copied over all my movies and shows over SMB.  The directories were set up as 711 (rwx--x--x) and the files were setup as 700 (rwx------).  I have also moved many files with NFS and I get 644 (rw-r--r--), and occasionally 666 (rw-rw-rw).  I'm not quite sure why I get 2 variations of permissions with NFS, but again, XBMC has always seen my shows.  XBMC is connected to the shares through SMB, and I have a mix of both avi's and mkv's.  My directory structure is:

 

Show/S1/Show.101.avi

Show/S1/Show.102.avi

Show/S2/Show.201.avi

Show/S2/Show.202.avi

etc...

 

As for the direct questions.

 

1.  I'm not seeing a difference as I explained above.

1a.  It should not matter.  Again, I have avi's, mkv's, mp4's, and varying others.

2.  All of mine are 711 as mentioned above.

3.  Not sure.  Hopefully someone else can answer.

 

Bonus: the .DS_Store and "._" files don't cause problems with unRaid nor XBMC.  The only time they may be a nuisance is with PCs seeing them, but again, they are just a nuisance at that point.

 

With all this said, I am using the latest build of XBMC before they closed off the builds for the merge.  I believe this is the build from either 3/1/10 or 3/2/10.  I have used both the standard database XBMC uses to store the library data and a mysql database (currently using mysql on unRaid for this).

  • Author

I'll have to check and see which version of XBMC I'm running, maybe that's the problem.  It's almost surely not that new.  Can you tell me which version you have?

 

Is it safe and is it recommended to use the built-in updater function for the XBMC/Boxee hack on AppleTV?  I used the patchstick load to install XBMC on the AppleTV (and don't use Boxee).

I am using XBMC r28256.

 

I can't advise on the AppleTV updating since all of mine are on Mac computers, but I have seen a lot of people on the forums who run AppleTVs are using this revision due to the Broadcom Chip for 1080p playback.  Hop over to the XBMC forums under Mac / AppleTV and you will find plenty.

  • 4 weeks later...
  • Author

I'm still having issues with this.  I use Handbrake for ripping TV show DVDs to mkv files.  Some other videos I have, I've just saved from the web, and they're often avi files.  I thought maybe this might be related to file extension, so I ran an experiment.

 

I created two sets of files - one avi, one mkv.  They were bogus files (empty).  I created versions with different permissions: 755, 700, and 644.  (700 seems to be the default when I drag them to unraid using SMB and Finder, though sometimes it seems to be 755... I haven't figured out how this works yet.)

 

I've also seen this behavior with XBMC running on my Mac, so it's not unique to AppleTV.  And this gives me a convenient way to test this and take screen caps.  Here's what I saw:

 

2czyonl.jpg

 

205p1l3.jpg

 

As you can see, the problem seems to be with 755 permissions, and file extension doesn't matter.  XBMC isn't seeing the files with permissions 755 (rwx-rx-rx).  Why is that?

 

Is there a way on unraid to specify the default umask for copied files?  It would be really nice if I could do this by file type (extension) for better granularity.

 

 

 

  • Author

I decided to test the default transfer permissions, too.  I created three files on my Mac using a terminal window, each with a different set of permissions: 644, 700 and 755.  I then copied those files to unraid (drag and drop) using the Finder.  The result was that all three files had permissions 700 on the unraid box.

 

For grins, I tried creating a couple directories next... I put those three files into a directory called dir-700.  I then made a copy of that directory as dir-755.  The permissions on the contained files were the same as before, but I changed the permissions on the two directories to be 700 and 755, respectively.  Then I dragged and dropped them from my Mac to the unraid box using Finder.  The results are below.

 

On the Mac side:

2aamy4j.png

 

On the unraid side:

25ph00i.png

 

So... if you look closely, you'll see that when copying the directories, the directory permissions were both mapped to 711.  And as before, all the files were mapped to 700.

 

One last little tidbit... I checked some VOB rips that I put on unraid...  I've mucked with the permissions, so I can't swear to what they were when I copied them over.  But I saw some where the contains .vob and .ifo and all that were 700 and some that were 755.  In non-Library mode, XBMC couldn't see the 755 files... BUT it would properly scrape the directories, list the movies, and play them in XBMC.  So the only problem here seems to be with TV shows as single files with permissions 755.

 

 

Random question....  As I was thinking about this, I decided I wasn't 100% how my Mac was mounting the Tower drive.  It just shows up in the left pane of the Finder window under "SHARED".  I had assumed it was SMB, but how would I know for sure?

Here's a previous post that explains this: http://lime-technology.com/forum/index.php?topic=6609.msg64024#msg64024 (repeated here to generate warm-fuzzies)

 

It is not a bug. It depends on how you configured SAMBA to map additional non-unix attributes, like the WinOS HIDDEN flag.

 

Look into the SAMBA options of "map hidden", "map archive", and "map system" within the smb.conf man pages.

 

sam.0507.gif

As for the default settings, have a look at SAMBA's "create mask" and "directory mask" combined with "force create mode" and "force directory mode" to set up some defaults.

  • Author

Not saying it's a bug.  I can see the files fine on my Mac, but XBMC running on my Mac can't (nor can AppleTV running XBMC).

 

I see what you're saying now... so, if I'm mounting the drive via SMB, and the local file permissions are such that if the "other" execute bit is set (like it would be with Unix 755, but not with 644 or 700), then Samba would interpret that as being hidden and not show it.

 

And yet, I can see it from my Mac.  So can I assume then that my Mac is not mounting that drive via Samba?  How can I verify how my Mac is mounting the unraid box?  It just magically shows up in the Finder "SHARED" section of the left-side navigation pane.  The Mac apparently scans the network in the background for machines with shared drives (it also picks up other Macs on my network, and my NAS drive that I'm replacing).  I'm not sure how the unraid box advertises itself to the network.  Is it only via SMB? 

 

Is there another way to mount this drive from XBMC besides SMB, that wouldn't have this problem?  I've always just used SMB.

 

And back to the other question... how do you set the default umask or whatever on unraid such that files are never created with that last execute bit set?

 

BTW, that seems like a pretty bad mapping between unix and samba.  Surprised no one has come up with a solution for that.  (Maybe Apple has done just that, which allows me to see the files.)

 

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.