Koozali.org: home of the SME Server

[Announce] kPlaylist RPM for SME 7.x

Offline cool34000

  • *
  • 339
  • +0/-0
[Announce] kPlaylist RPM for SME 7.x
« on: November 24, 2007, 11:56:30 AM »
Hi all,

I've made an RPM based on kPlaylist.
All info on SME's Wiki


Best regards,
Sylvain

Offline zener

  • *
  • 18
  • +0/-0
    • http://www.techtalkireland.com
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #1 on: November 28, 2007, 01:07:26 AM »
This looks like a really cool app. I've downloaded it and installed as per the instructions but I can't get it to see any files other than those in the /opt/kplaylist/files directory.

I followed the instructions and edited the file to add /home/e-smith/files/ibays/music/files/ to the list of basedirs. I also added this to the basedir line in the web front end and in the list of dirs to search. I tried creating ln -s in the original basedir to link to the actual music dir but still no luck.

Also the only user that can access the samba share is the admin user - even other members of the admin group are refused access. Is this right ?

I'm obviously doing something wrong and I appreciate your work here but any pointers would be appreciated.

Thanks

ZENER
Just because I can't speak doesn't mean I'm dumb !! :-D ...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #2 on: November 28, 2007, 08:05:17 AM »
Hi,

I forgot to say on the Wiki that music files must be Apache readable (and writable if you want to edit files from kPlaylist editor)... I will update the Wiki ASAP.

About SAMBA, I only tested with admin account. I will look at it and try to make it work as detailled in the Wiki. Sorry for that mistake.


Sylvain

Offline zener

  • *
  • 18
  • +0/-0
    • http://www.techtalkireland.com
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #3 on: November 29, 2007, 12:26:05 PM »
Thanks for the swift reply.

I'm fairly new to linux systems, I can add users and groups and change ownership of files but how do I add a user to a folders permissions ? Again sorry for pestering you.  :)

ZEN
Just because I can't speak doesn't mean I'm dumb !! :-D ...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #4 on: November 29, 2007, 01:01:14 PM »
Maybe group "shared" might do the job for you. Apache should be able to use this account, so do your users...
Don't have the time to test this right now. Please let me know of your success so that I can update the Wiki.

Offline zener

  • *
  • 18
  • +0/-0
    • http://www.techtalkireland.com
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #5 on: November 29, 2007, 01:04:47 PM »
Thanks again but I don't know how to achieve this. What command do I use to add the user apache to the group Shared ?

ZEN
Just because I can't speak doesn't mean I'm dumb !! :-D ...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #6 on: November 29, 2007, 01:13:56 PM »
You don't need to!
Just change the group owner to "shared"
Code: [Select]
# chgrp -R shared /path/to/music/root/folder

Offline zener

  • *
  • 18
  • +0/-0
    • http://www.techtalkireland.com
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #7 on: November 29, 2007, 01:34:13 PM »
No that doesn't do it either  :-(.
In the Filehandling section I added the path to the music folder and also tried deleting the default path leaving only the music folder - it still won't see the files there. A symlink placed in the /opt/kplaylist/files directory, would that produce the same result ? I tried that before and it didn't but I hadn't changed the group that time.

I presume it's something peculiar about my setup here because the feedback on kplaylist is positive - hence why I chose it. I have a fresh install of SMEServer 7.1 with no mods except 3 addons - GroupOffice - DAR2 and DiskUsage, these installed without a hitch and work fine.

ZEN
Just because I can't speak doesn't mean I'm dumb !! :-D ...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #8 on: November 29, 2007, 02:56:37 PM »
Yes, you can try a symlink.

Offline zener

  • *
  • 18
  • +0/-0
    • http://www.techtalkireland.com
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #9 on: November 29, 2007, 03:16:17 PM »
Didn't work . . .

I checked the httpd.conf file for the user and group that apache runs under and it seems to be user:www and group:www.
That user already has access to the music folder so I presume that means the web server has access to the files. If I ls -l in the music folder the files have the permissions : -rwxrw---- . That's not right is it ? Sould it be: -rwxrwx--- ?

At this stage I'm almost out of hair to pull mostly because of my own ignorance of the finer workings of *nix. I've been trying to make this work for almost a week now and have re-installed SME 4 times already with different configs but still no joy.

Thanks again for the replies by the way, I appreciate your patience.

ZEN
Just because I can't speak doesn't mean I'm dumb !! :-D ...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #10 on: November 29, 2007, 03:52:46 PM »
Default rights on music files should be:
owner: root
grp owner : www (but you can use shared)
perms: -rwxrw----

You do not need 'x' for Apache (www). For testing purposes ONLY, you can try chmod 777 to see if it fix your problem...

Offline zener

  • *
  • 18
  • +0/-0
    • http://www.techtalkireland.com
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #11 on: November 29, 2007, 08:02:13 PM »
Yeah I tried chmod 777 -R earlier and it still wont find the files - even a symlink won't work. I can use the symlink from the command line i.e. cd symlink so I know it works.

What now ?? Should I just take up gardening maybe  :???:

ZEN
Just because I can't speak doesn't mean I'm dumb !! :-D ...

Offline zener

  • *
  • 18
  • +0/-0
    • http://www.techtalkireland.com
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #12 on: November 30, 2007, 02:14:57 PM »
A friend of mine who uses SME Server 7.2 has also run into the same problems as me.
Any suggestions about where to start solving this one ?

ZEN
Just because I can't speak doesn't mean I'm dumb !! :-D ...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #13 on: December 01, 2007, 03:40:57 PM »
Hi,

Can you paste here the content of your custom template please?
Could you also show your files and folders perms?

Offline zener

  • *
  • 18
  • +0/-0
    • http://www.techtalkireland.com
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #14 on: December 01, 2007, 08:30:16 PM »
I presume you mean the kplaylist template ?

This is one I found at :
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98kplaylist

Code: [Select]
#--------------------------------------------------------------
# kplaylist - Web based jukebox
#--------------------------------------------------------------
Alias /kplaylist /opt/kplaylist/html
{
    if (exists $kplaylist{'URL'})
      { $OUT .= "Alias  /$kplaylist{'URL'} /opt/kplaylist/html"; }
}

<Directory /opt/kplaylist/html>
{
    my $kplaylistsec = $kplaylist{'HTTPS'} || "off";
    if ($kplaylistsec eq "off")
      { $OUT .= "  # SSLRequireSSL on"; }
    else
      { $OUT .= "  SSLRequireSSL on"; }
}
  Options None
  Options +Indexes
  Options FollowSymLinks
  AllowOverride None
  order deny,allow
  deny from all
{
    my $kplaylistpa = $kplaylist{'PublicAccess'} || "local";
    if ($kplaylistpa eq "local")
      { $OUT .= "  allow from $localAccess"; }
    else
      { $OUT .= "  allow from all"; }
}
  AddType application/x-httpd-php .php .php3 .phtml
  AddType application/x-httpd-php-source .phps
  php_admin_value open_basedir /opt/kplaylist:/tmp:/usr/share/pear
  php_admin_value post_max_size { $kplaylist{MaxUpload} }
  php_admin_value upload_max_filesize { $kplaylist{MaxUpload} }
  php_value allow_url_fopen on
  php_value memory_limit 32M
</Directory>
#--------------------------------------------------------------

The contents of the Ibay where the music folder is are:

/home/e-smith/files/ibays/

Code: [Select]
drwxr-xr-x  6 root root   4096 Oct 15 06:03 documents
drwxr-xr-x  6 root root   4096 Oct 15 06:03 jingles
drwxr-xr-x  6 root shared 4096 Oct 15 06:03 music
drwxr-xr-x  6 root root   4096 Oct 15 06:03 pre-recorded
drwxr-xr-x  5 root root   4096 Nov 30 17:58 Primary

The contents of /opt/kplaylist/files/ :
Code: [Select]
drwxrws--T  2 root www 20480 Nov 30 19:41 80's Number 1's

The above are just the current settings, they've changed over the course of testing using suggestions from various people familiar with *nix.

This is the kplaylist section of httpd.conf :
Code: [Select]
#--------------------------------------------------------------
# kplaylist - Web based jukebox
#--------------------------------------------------------------
Alias /kplaylist /opt/kplaylist/html


<Directory /opt/kplaylist/html>
  # SSLRequireSSL on
  Options None
  Options +Indexes
  Options FollowSymLinks
  AllowOverride None
  order deny,allow
  deny from all
  allow from 127.0.0.1 192.168.0.0/255.255.255.0
  AddType application/x-httpd-php .php .php3 .phtml
  AddType application/x-httpd-php-source .phps
  php_admin_value open_basedir /opt/kplaylist:/tmp:/usr/share/pear
  php_admin_value post_max_size 16M
  php_admin_value upload_max_filesize 16M
  php_value allow_url_fopen on
  php_value memory_limit 32M
</Directory>
#--------------------------------------------------------------

Hope this is what you're looking for.

ZEN
Just because I can't speak doesn't mean I'm dumb !! :-D ...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #15 on: December 01, 2007, 09:10:11 PM »
I was starting a big funny/silly post to answer to you, but finally I won't... Let's stay fair and don't spend much time on this!

Just read carefully wiki instructions, it talking about some custom template to create in some cases!!!

Sorry, I was presuming you read the wiki :hammer:

Offline zener

  • *
  • 18
  • +0/-0
    • http://www.techtalkireland.com
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #16 on: December 02, 2007, 01:51:08 PM »
Sorry, I was presuming you read the wiki :hammer:

As I said in my post those are the files in the system NOW. I have installed this about 4 times in all, religiously following your WIKI to the letter - it didn't work. The SAMBA share is not accessible to anyone except the admin user. Not just for me but for another person also attempting to get this to work who has a lot more unix experience than me.

I have executed those commands in the wiki so often I practically know them by heart but they don't fix the problem. Even changing the share permissions didn't have any effect. The reason there is no custom template shown above is because I had just reinstalled the system AGAIN for the 5th time and hadn't got that far yet this time.

Thanks for your help.

ZEN
Just because I can't speak doesn't mean I'm dumb !! :-D ...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #17 on: December 02, 2007, 02:11:07 PM »
I was updating the wiki when you replied. There are a few modifications like I promised on top of the thread about "admin-only" issue after RPM install.
This work for me in the default install (music stored in opt/kplaylist/files) and now users can browse/download/upload using Samba. Don't change default chmod on this folder!

WITHOUT a custom-template, YOU CAN'T give access to another directory than default (/opt/kplaylist/files), so paste the content of the custom-template you've made following wiki instructions.

Offline zener

  • *
  • 18
  • +0/-0
    • http://www.techtalkireland.com
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #18 on: December 02, 2007, 02:27:46 PM »
Great ! the Samba share works now. Thanks.

Below is the custom template I've created. I copied and pasted the commands to the sever so as not to make any errors - to be sure:

I've just done a signal-event post-upgrade and reboot and the system has gone foobar ! The line :

Code: [Select]
Syntax error in line 853 of /etc/httpd/conf/httpd.conf:
php_admin_value takes two arguments, PHP Value Modifier (Admin)

keeps repeating on the console !

Code: [Select]
#--------------------------------------------------------------
# kplaylist - Web based jukebox
#--------------------------------------------------------------
Alias /kplaylist /opt/kplaylist/html
{
    if (exists $kplaylist{'URL'})
      { $OUT .= "Alias  /$kplaylist{'URL'} /opt/kplaylist/html"; }
}
 
<Directory /opt/kplaylist/html>
{
    my $kplaylistsec = $kplaylist{'HTTPS'} || "off";
    if ($kplaylistsec eq "off")
      { $OUT .= "  # SSLRequireSSL on"; }
    else
      { $OUT .= "  SSLRequireSSL on"; }
}
  Options None
  Options +Indexes
  Options FollowSymLinks
  AllowOverride None
  order deny,allow
  deny from all
{
    my $kplaylistpa = $kplaylist{'PublicAccess'} || "local";
    if ($kplaylistpa eq "local")
      { $OUT .= "  allow from $localAccess"; }
    else
      { $OUT .= "  allow from all"; }
}
  AddType application/x-httpd-php .php .php3 .phtml
  AddType application/x-httpd-php-source .phps
  php_admin_value open_basedir
/opt/kplaylist:/tmp:/usr/share/pear:/home/e-smith/files/ibays/music/files
  php_admin_value post_max_size { $kplaylist{MaxUpload} }
  php_admin_value upload_max_filesize { $kplaylist{MaxUpload} }
  php_value allow_url_fopen on
  php_value memory_limit 32M
</Directory>

ZEN
« Last Edit: December 02, 2007, 02:36:06 PM by zener »
Just because I can't speak doesn't mean I'm dumb !! :-D ...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #19 on: December 02, 2007, 02:43:08 PM »
Looks like you messed up modifying the custom-template!
Code: [Select]
  php_admin_value open_basedir /opt/kplaylist:/tmp:/usr/share/pear:/home/e-smith/files/ibays/music/filesThis goes in one line... :?

Offline zener

  • *
  • 18
  • +0/-0
    • http://www.techtalkireland.com
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #20 on: December 02, 2007, 02:51:54 PM »
I just noticed that. I used Pico to edit the file via a secure shell - ssh - from Terminal on my Mac and placed the cursor at the end of the line but once I started typing it moved down to the following line. I assumed this was Pico just continuing the line for clarity when infact it was actually inserting a CR. I've since re-edited widening the window on ssh and ensuring the command was all one line. I saved out and then rechecked and it's ok this time. I'll post back if it's worked.

ZEN
Just because I can't speak doesn't mean I'm dumb !! :-D ...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #21 on: December 02, 2007, 03:08:33 PM »
It is working! (just tested it a few hours ago with an ibay without a symlink)
If it's not for you, like the wiki said, ensure that Apache can read/write those files.
For an ibay, that means how your MP3 ibay is configured (who is owner and who have read/write access)

Offline zener

  • *
  • 18
  • +0/-0
    • http://www.techtalkireland.com
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #22 on: December 02, 2007, 03:21:18 PM »
It is working now, thanks for your patience. It seems ssh and terminal inserted a CR automatically when the end of a line was reached screwing up the command ! Widening the terminal window prevented it from doing this.

I've added the ibay to the "find" panel and presto it now finds the files.

Thanks again for your help and the hard work you've put in.

ZEN

Just because I can't speak doesn't mean I'm dumb !! :-D ...

Offline raem

  • *
  • 3,972
  • +4/-0
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #23 on: December 04, 2007, 09:18:26 AM »
zener

The correct way to prevent line wrapping when using pico is:

pico -w filename
...

Offline zener

  • *
  • 18
  • +0/-0
    • http://www.techtalkireland.com
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #24 on: December 04, 2007, 11:04:58 AM »
Thanks for that, maybe I'll stick to vi from now on though.

This is a really nice system - impressed with the layout and the link to the song lyrics.

Just a few questions:

Is there any limit to the number of files or directories allowed ?
Which version ID3 tag does the app read ?
Some of the song names became corrupt once listed in kplaylist - not the actual files just their link in the list.
I've had this in the past with other audio players where they don't like certain characters in the filename, for example "&" or " ' ". I presume this is down to unicode and translations, would that be right ?
Could it also be the number of characters in the filename ? I noticed that most of the files affected had a lot of characters in their name but not all of them.

Thanks again.

ZEN
Just because I can't speak doesn't mean I'm dumb !! :-D ...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] kPlaylist RPM for SME 7.x
« Reply #25 on: December 04, 2007, 12:04:37 PM »
Hi,

Quote from: zener
Is there any limit to the number of files or directories allowed ?
I can remember that there's a MySQL limit. Actually this limit is for updating the database... Look on kplaylist forum, this question has been answered. You should find out which value needs to be changed and have an idea on how much an mp3 cost in memory during this process. Don't change the default value if all works nice!

Quote from: zener
Which version ID3 tag does the app read ?
kPlaylist use ID3v1 by default. You can use ID3v2 as described in the wiki. Depends on how your music files are tagged... I use ID3v1 which has better results for me.

Quote from: zener
I presume this is down to unicode and translations, would that be right ?
I guess so too. Some of french caracters are strange too ('é' ; 'è' ; à ; and so on...)
I tried that:
Code: [Select]
db configuration setprop smb UnixCharSet ISO8859-1
expand-template /etc/smb.conf
/etc/init.d/smb restart
And it fixed my problem (after re-uploading the few folders with strange names). Don't know what should your UnixCharSet be, I can't remember where I found the original info. Google should have the answer for you!
There's also an UTF-8 version of kPlaylist, only available with a custom download on kPlaylist website...