Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 8 of 8
  1. #1
    Senior Member SlimChances's Avatar
    Join Date
    Apr 2005
    Posts
    457

    mangled permissions

    I have mangled permissions of my music and now LMS does not see my music. I used Audiomuzes code(below) previously with success but now my Server is seeing no music in the directory after clear and scan.

    (sudo chown -R <yourusername>:<yourusername> * && find . -type d -execdir sudo chmod 775 {} \; && sudo find . -name "*" -type f -exec chmod 644 {} \;

    http://forums.slimdevices.com/showth...ions-correctly)

    I tried deleting the cache folder's contents but still no luck. I tried Audiomuzes command (inserting my username) but no luck.

  2. #2
    Senior Member aubuti's Avatar
    Join Date
    Oct 2005
    Posts
    8,354
    If it was working, what prompted you to change the permissions? I'm not trying to be a smartass, just trying to understand. If you're fixing permissions after adding new albums, it would be safer to do it only on the new albums, not on the whole library.

    Also, what kind of drive is it? Is it internal on your server, or an external USB drive, or a NAS, or what?

    After you ran the command, what do you have for username, filename, and permissions on the folders and files in your music library. An example of the output from a "ls -l" command would be much more helpful (to me, at least) than screenshots of the the GUI.

    Finally, the good thing about that command that audiomuze posted is that it is fairly parsimonious with permissions, ie, it doesn't give more permissions than it needs to, and that's good for your security. But for debugging purposes you could try something simpler, such as navigating to the top of your music directory (or just a branch for testing) and doing:

    sudo chmod -R 755 *

    And always remember to rescan after you change the permissions because LMS couldn't see the files before.

  3. #3
    Senior Member SlimChances's Avatar
    Join Date
    Apr 2005
    Posts
    457
    I know it sounds idiotic especially after I got it working before. I have had permission issues with an external hard drive that I was trying to back my music onto . I stupidly thought it might be an issue with permissions in my music folder so I used sudo chmod 770 -R on both the directories where my music is as well as the external drive.

    Here is output from ls -l

    -4.linux-gcc4x.i586.deb.run
    drwxrwxr-x 2 david david 4096 May 28 21:53 Desktop
    drwxrwxr-x 2 david david 4096 May 10 17:48 djs
    -rw-r--r-- 1 david david 8445 May 4 14:07 examples.desktop
    drwxrwxr-x 3 david david 4096 May 10 15:15 GenPuid
    lrwxrwxrwx 1 david david 24 May 6 08:40 Link to Documents -> /media/STORAGE/Documents
    lrwxrwxrwx 1 david david 24 May 6 08:40 Link to Downloads -> /media/STORAGE/Downloads
    lrwxrwxrwx 1 david david 20 May 6 08:40 Link to Music -> /media/STORAGE/Music
    lrwxrwxrwx 1 david david 23 May 6 08:40 Link to Pictures -> /media/STORAGE/Pictures
    lrwxrwxrwx 1 david david 21 May 6 08:40 Link to Videos -> /media/STORAGE/Videos
    drwxrwxr-x 5 david david 4096 May 11 14:47 MusicIP
    drwxrwxr-x 3 david david 4096 May 4 22:39 My RoboForm Data
    drwxrwxr-x 3 david david 4096 May 14 15:10 Picasa
    drwxrwxr-x 2 david david 4096 May 4 15:08 Public
    drwxrwxr-x 2 david david 4096 May 4 11:11 Templates
    drwxrwxr-x 2 david david 4096 May 9 22:07 Ubuntu One
    david@david-desktop:~$

    I will try the chmod command you gave...Thanks

    sorry I think you wanted this:
    david@david-desktop:/media/STORAGE$ ls -l
    total 40
    drwxrwx--- 4 david david 4096 May 6 08:39 Documents
    drwxrwx--- 4 david david 4096 May 28 16:48 Downloads
    drwxrwx--- 2 root root 16384 May 4 09:39 lost+found
    drwxrwxr-x 3 david david 4096 May 6 08:39 Music
    drwxrwx--- 3 david david 4096 Jan 17 2009 My RoboForm Data
    drwxrwx--- 7 david david 4096 May 6 08:40 Pictures
    drwxrwx--- 12 david david 4096 May 6 08:40 Videos
    david@david-desktop:/media/STORAGE$
    Last edited by SlimChances; 2012-05-29 at 14:31.

  4. #4
    Senior Member SlimChances's Avatar
    Join Date
    Apr 2005
    Posts
    457
    Tried sudo chmod -R 755 * on a small music directory within my music and rescanned LMS. Rescan took only a few seconds and no music is available still.

    I notice the group permission is me (david). Should it be something like Squeezeboxserver or logitechmediaserver?

  5. #5
    Senior Member
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    1,864
    It's been my experience that using external media like that (I assume FAT or NTFS on the external drive) on Linux can be problematic. The drivers to access NTFS and FAT filesystems do not handle permission/owner changes the way you would expect a normal ext4 (or whatever UNIX filesystem) to behave.

    EDIT: Oh, maybe what I said is wrong. There is a lost+found dir so maybe the media is ext4.

  6. #6
    Senior Member SlimChances's Avatar
    Join Date
    Apr 2005
    Posts
    457
    The external drive (ext 4) was the intial source of my difficulties that led to my internal drive (ext 4) which contains my music folders to no longer be accessible.
    Scanning takes only 10 seconds and my Music Folder is about 20,000 in size so the scanner is not even recognizing the files. The music is mainly FLAC and the scan sees 0 songs and then scans MusicIP correctly and skips the other scan types (ie images)

  7. #7
    Senior Member SlimChances's Avatar
    Join Date
    Apr 2005
    Posts
    457
    Think I fixed it. I went up a directory when I applied Audiomuzes command and it seems to work now. I guess the permissions set by the cammand now include non music files now but perhaps when I understand permissions better I an change those individual directories back to where they should be.
    Thanks for your help Aubuti

  8. #8
    Senior Member aubuti's Avatar
    Join Date
    Oct 2005
    Posts
    8,354
    Quote Originally Posted by SlimChances View Post
    Think I fixed it. I went up a directory when I applied Audiomuzes command and it seems to work now. I guess the permissions set by the cammand now include non music files now but perhaps when I understand permissions better I an change those individual directories back to where they should be.
    Thanks for your help Aubuti
    Normally I would say that your explanation indicates that the parent music directory didn't have the right permissions, but from your output here:

    drwxrwxr-x 3 david david 4096 May 6 08:39 Music

    the directory Music clearly is readable and executable (ie, users can descend into sub-directories) by all. So that wouldn't seem to explain it. Btw, don't worry that the files' and directories' group ownership is "david". As long as the last triplet (r-x in the example above) includes read for files and read+execute for folders then you should be fine.

    So I'm glad it's working, but I'm not sure that applying the chown and chmod commands one level higher is what fixed it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •