Kodi Community Forum

Full Version: Library scan doesn't recognise when it gets a new permission to a file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I think that may have come across a bug in the music library scanning section. (I am using Ubuntu 14.04 and/or Mint 17 with Kodi 15.0), and my music library is hosted on an NFS v4 share on a different machine

1, My wife added an album to the directory that kodi scans for music, but only gave herself read permission to it (some would say that she is selfish, but we get on ok)
2. On our HTPC, kodi runs with its own ID, and did not have read permission to the file -- unsurprisingly it was not added to the library.
3. She then changed the permission on the file to 644 (read access to anyone) and got kodi to rescan the library (she used chmod, which changes permission but not the time stamp). The album still did not appear in the library (although I could play it by going to the files menu). My expected behaviour was that the album would appear in the library after changing the permissions.
4. She then used "touch" to change the access time and rescanned the library. At this point, the album appeared in the library fine.

I have created three log files to show this effect (using "TEST SONG.mp3")

Scan the file with no permission: http://pastebin.com/DjHaEBx7
Second scan after chmod: http://pastebin.com/BLbWtp91
third scan after touch: http://pastebin.com/xtU6wTg4
from the code, the behavior is expected. We store a md5 hash based on filename, size and date.
File permissions do not change any of those attributes, so it is ignored.

If it is a bug or not is a matter of opinion Smile

generally, I'd advice to use squashing to a single user on NFS mounts for kodi library data
Thanks for looking -- as you say, if its a bug or not is clearly a matter of opinion.

I would argue that it probably gives the user a more intuitive feel if the scan simply ignores an unreadable file (and then picks it up if/when it gains read access).