Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 9 of 9
  1. #1
    Senior Member audiomuze's Avatar
    Join Date
    Oct 2009
    Posts
    755

    Setting file permissions correctly

    Here's one for anyone struggling with Linux file permissions. It is run from a terminal window in the main folder housing your music collection. Basically it does two things: 1) ensures all folders and files are owned by your user account; 2) makes all directories and files r/w to your account and read only to all others

    Code:
    sudo chown -R <yourusername>:<yourusername> * && find . -type d -execdir sudo chmod 775 {} \; && sudo find . -name "*" -type f -exec chmod 644 {} \;
    Linux finally gets a great audio tagger: puddletag - now packaged in most Linux distributions.

  2. #2
    Junior Member
    Join Date
    May 2011
    Posts
    16
    That should be helpful for folks. It was thanks to audiomuze's posting about Ubuntu + HP Microserver some time ago that got me curious and on my way to setting up the same system.

    It forced me to learn a little bit about linux/ubuntu (completely new to linux) and I definitely had run into a file permissions problem but spent some time digging around to figure it out.

    I found this page on file permissions helpful should anyone else want to know what those numbers mean:

    http://www.zzee.com/solutions/unix-permissions.shtml

    Just upgraded to LMS 7.7.1 on my HP Ubuntu Microserver today

  3. #3
    Senior Member SlimChances's Avatar
    Join Date
    Apr 2005
    Posts
    457
    I tried your command replacing only <yourusername>:<yourusername> with my ownuser name but I am not able to playback my music files. Oddly the web server does not see my player but the player sees the web server and my music files but when I try to play the plare displays "nothing"
    I also tried earlier to set squeezeboxserver as the group under permissions but it will not allow that. I can set owner to squeezeboxserver but not group . I am stumbling along trying to configure my new Ubuntu 12.04 64 bit to work with LMS among other things and hope someone can set me straight on my permissions issues.
    I have a screenshot of my earlier attempt
    my files are on a separate HD in EXT 4 format
    Attached Images Attached Images  
    Last edited by SlimChances; 2012-05-05 at 14:38.

  4. #4
    Senior Member SlimChances's Avatar
    Join Date
    Apr 2005
    Posts
    457
    More Fool Me. I had my old computer with LMS installed hooked up to ethernet along with my new machine that I thought didn't work. Works fine now I turned the old PC off.
    Thanks

  5. #5
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,299
    Quote Originally Posted by SlimChances View Post
    I tried your command replacing only <yourusername>:<yourusername> with my ownuser name but I am not able to playback my music files. Oddly the web server does not see my player but the player sees the web server and my music files but when I try to play the plare displays "nothing"
    I also tried earlier to set squeezeboxserver as the group under permissions but it will not allow that. I can set owner to squeezeboxserver but not group . I am stumbling along trying to configure my new Ubuntu 12.04 64 bit to work with LMS among other things and hope someone can set me straight on my permissions issues.
    I have a screenshot of my earlier attempt
    my files are on a separate HD in EXT 4 format
    On Ubuntu, the squeezeboxserver user's group is "nogroup". But I'm going to guess that it might make more sense to assign the ownership of the files to a real, login-able account / group and give read permissions to everyone (including squeezeboxserver) else.
    Last edited by gharris999; 2012-05-05 at 15:05.

  6. #6
    Senior Member audiomuze's Avatar
    Join Date
    Oct 2009
    Posts
    755
    my entire music library has had ownership and permissions set using
    Code:
    sudo chown -R yourusername:yourusername * && find . -type d -execdir sudo chmod 775 {} \; && sudo find . -name "*" -type f -exec chmod 644 {} \;
    run from the parent folder of my music library e.g. if the library is stored in /music you'd change into /music and then run the above. LMS only needs to be able to read the audio files, not write them. LMS creates a user squeezeboxserver with no group, signified by "nogroup". Make sure /music is also set to 775 so that LMS can access it.
    Last edited by audiomuze; 2012-05-06 at 21:10.

  7. #7
    Senior Member SlimChances's Avatar
    Join Date
    Apr 2005
    Posts
    457
    I realze I am not seeing this clearly; are you saying that nogroup replaces username in the permission window for the music folder. I do not see an option for nogroup (see screenshot). It gives options for samba, adm etc but not nogroup or squeezeboxserver (which my last install did)
    Attached Images Attached Images  

  8. #8
    Senior Member audiomuze's Avatar
    Join Date
    Oct 2009
    Posts
    755
    no, im saying use the command string exactly as shown and replace yourusername:yourusername with whatever your username is. LMS will then have read access to all your music, much like any other user.
    Linux finally gets a great audio tagger: puddletag - now packaged in most Linux distributions.

  9. #9
    Senior Member SlimChances's Avatar
    Join Date
    Apr 2005
    Posts
    457
    Right thats what I did, it's working fine

Posting Permissions

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