PDA

View Full Version : Scanning fails on fresh install



OiPenguin
2007-10-22, 14:02
I've just installed Slimserver and connected Squeezebox v3, however I've made several unsuccesful attempts at scanning my music files. Intitially I had two folders (with plenty artist subfolders) below /home/felles/musikk in My music in server settings. I've merged the to folders into one (still containing plenty artist subfolders). I've done several attempts at scanning, but never gone beyond "259 albums with 518 songs by 253 artists." My music folder contains "6301 listings, at 25,3 GB".

I've tried Look for new... and Clear librar and rescan.. I've also tried restarting the server.

Where does it all go wrong and how do I fix it?

Running on Ubuntu server 7.10, fresh install.

The sounds great, by the way, so I look forward to solving this problem.

SlimServer Version: 6.5.4 - 12568 - Debian - EN - iso-8859-1
Server IP address: 192.168.1.2
Perl Version: 5.8.8 i486-linux-gnu-thread-multi
MySQL Version: 5.0.45-Debian_1ubuntu3

mlsstl
2007-10-22, 14:28
Could this be a file permissions issue? Check the ownership and access rights of the music and make sure Slimserver has the right to use them.

OiPenguin
2007-10-22, 23:28
I doubt this is a permission issue, but I'll check that again tonight. I've moved the files from folder to folder and hence changed permissions for all folders to 777 at some point. Furthermore, scanning typically finds one or two songs out of a full album and I can't see why different files/songs within the same folder/album should have different permissions?

Are there any other likely causes to my problem? Has anyone else experienced similar problems?

OiPenguin
2007-10-23, 14:54
Permissions were set to 777, but that evidently wasn't sufficient.

I've now changed owner of music files and -folders to Slimserver which has made a difference. All files appears to be indexed now. However, no new files will have Slimserver as owner by default and I'd like files to be indexed no matter who the owner is. Can this problem be solved in other ways than by manually changing the owner?

Mark Miksis
2007-10-23, 15:04
It shouldn't be necessary for slimserver to own the files. What are the permissions and ownership of the parent folders:
/home/felles/musikk
/home/felles
/home

snarlydwarf
2007-10-23, 15:09
It really depends on how you set up ownership and permissions.

I set all music files to be owned by -me-. I want to be able to read and write them.

"Others" (including the slimserver user) don't need to write to the music files. So they only need read.

This does that:
cd (wherever you store music)
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

That makes files 644 (rw-r--r--) and directories 755 (rhxr-xr-x) ... for arcane reasons you need 'x' permission on directories.

I do that as -me- and I already own the files. You may have to chown them all to yourself if you haven't.

Likewise, I configured Samba to save files as me, and to use the umask of 022 (which basically strips the write flags for group and others... making files 644 and directories 755 when they are first created).

With that I can read/write files from Linux or Windows, and Slimserver can only read them (since it has no need to write them).

OiPenguin
2007-10-23, 15:14
-the permissions and ownership of the parent folders:
/home/felles/musikk
-owner: lars, create and delete files; group: lars, access files; others: access files
/home/felles
-owner + group: root - create and delete files, same for others
/home
- owner: root, create and delete, group+others: access files

Mark Miksis
2007-10-24, 11:45
-the permissions and ownership of the parent folders:

What about the x bits?

OiPenguin
2007-10-24, 12:13
It really depends on how you set up ownership and permissions.

I set all music files to be owned by -me-. I want to be able to read and write them.

"Others" (including the slimserver user) don't need to write to the music files. So they only need read.

This does that:
cd (wherever you store music)
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

Thanks! The first command appeared to have worked well. The second command worked after chown. Are there any other reasons than avoiding accidental deletions to configure as 644 rather than 777?

Indexing after chmod was successful, by the way


Likewise, I configured Samba to save files as me, and to use the umask of 022 (which basically strips the write flags for group and others... making files 644 and directories 755 when they are first created).

How do you do this? I'm using Webmin, but I assume you're doing this in the CLI? Other user might be adding files as well. Will this make files they add have me as owner?

Do you have any advice to help me rip directly to the server? I've got an Ubuntu laptop connected talking to the server, but Sound Juicer won't let me rip files to the server.

Mark Lanctot
2007-10-24, 12:22
Do you have any advice to help me rip directly to the server? I've got an Ubuntu laptop connected talking to the server, but Sound Juicer won't let me rip files to the server.

If you permanently mount a server share, it'll treat it as a local disc.

http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_mount_network_folders_on_boot-up.2C_and_allow_all_users_to_read.2Fwrite

Also I was a little wary of Sound Juicer and didn't like the fact that it didn't log errors, so I installed RubyRipper.

OiPenguin
2007-10-24, 12:26
What about the x bits?

I'm afraid I don't understand what you're referring to?

snarlydwarf
2007-10-24, 12:40
Thanks! The first command appeared to have worked well. The second command worked after chown. Are there any other reasons than avoiding accidental deletions to configure as 644 rather than 777?

Best Practices says to not give away too many permissions. There isn't a need for 777, so why grant it?



How do you do this? I'm using Webmin, but I assume you're doing this in the CLI? Other user might be adding files as well. Will this make files they add have me as owner?

Yeah, I don't use webmin.... The settings in /etc/samba/smb.conf that matter are these:

[homes]
create mask = 0755
directory mask = 0755

(To be inconsistent with normal unix stuff, they flip the ones and zeros... sort of like Cisco and their backwards netmasks...)




Do you have any advice to help me rip directly to the server? I've got an Ubuntu laptop connected talking to the server, but Sound Juicer won't let me rip files to the server.

Sound Juicer is for Linux? I would just use NFS then instead of SMB... Samba is great for making Windows and Linux talk to each other but NFS is better for unix-unix.

You would have to use SMBmount on the laptop to access the server, there is probably a gui for that, never used it.

OiPenguin
2007-10-24, 13:38
If you permanently mount a server share, it'll treat it as a local disc.

http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_mount_network_folders_on_boot-up.2C_and_allow_all_users_to_read.2Fwrite


I'm able to follow this guide to the last point, however I'm unable to figure out what '/media/sharename' is on my server. Are you able to help with that?

001 lars@ubuntu-server:/$ sudo mount -a
002 Could not resolve mount point /media/sharename
003 lars@ubuntu-server:/$ gksudo gedit /etc/fstab
004 lars@ubuntu-server:/$ sudo mount -a
005 14003: session setup failed: ERRDOS - ERRnoaccess (Access denied.)
006 SMB connection failed
007 lars@ubuntu-server:/$

Mark Lanctot
2007-10-24, 14:51
Does /media/sharename exist on the local machine, i.e. did you create it? (Incidentally, "sharename" is just an example.)

Does it have appropriate permissions?

Is the remote folder set up for sharing? See http://ubuntuforums.org/showthread.php?t=202605 (whoops, I should have included that Ubuntu forums post as well, it's very helpful.)

OiPenguin
2007-10-25, 14:33
Does /media/sharename exist on the local machine, i.e. did you create it? (Incidentally, "sharename" is just an example.)
'home' is a folder at the same level as bin, boot, etc
'felles' is a folder in 'home'
'music' is a folder in 'felles' and everything in 'felles' should be shared among all users on the network. Would this make my equivalent of '/media/sharename' '/home/felles/'?

The last line of /etc/fstab is now '//192.168.1.2/felles /home/felles smbfs credentials=/root/.smbcredentials,dmask=777,fmask=777 0 0'


Does it have appropriate permissions?

I believe the sharename is the core of the problem. 'felles' is currently 777. Would 755 be better?



Is the remote folder set up for sharing? See http://ubuntuforums.org/showthread.php?t=202605 (whoops, I should have included that Ubuntu forums post as well, it's very helpful.)

I picked this chapter: http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_share_public_folders_with_rea d.2Fwrite_permissions_.28Authentication.3DNo.29

My /etc/samba/smb.conf now looks like this

[felles]
comment = Fellesomr�det for familien kvisle p� ubuntu-server
path = /home/felles
force user = nobody
force group = nogroup
read only = No
create mask = 0777
directory mask = 0777
guest ok = Yes

Thanks!

When trying to mount I get an error (see below), I am however ripping directly to the server. Currently utterly confused, I don't know if I'd be able to repeat this. That shouldn't be neccessary, should it. Not even when I get my new laptop? Everyone on my network should now have permanent access, right? And '/home/felles' should be changed to 755 to avoid other users deleting files?

lars@ubuntu-server:~$ sudo mount -a
[sudo] password for lars:
29041: session setup failed: ERRDOS - ERRnoaccess (Access denied.)
SMB connection failed

Mark Lanctot
2007-10-27, 10:11
I'm hoping someone else jumps in here, because I'm at the limit of my knowledge.

All I can say at this point was I got the exact same error message when it didn't like the remote share name. I could not mount //192.168.1.3/Music/Music Library, it didn't seem to like the space in there, even when I put it in quotes or put a %20 instead of the space (which is how the share appeared in Places - Network).

//192.168.1.3/Music worked fine, I just have to tell SqueezeCenter to look at the /Music Library subfolder in the share.

However you don't have a space, your share name looks fine, so I don't know what to tell you.