PDA

View Full Version : sorry, even another newbie SS install question



mgh
2007-05-13, 17:23
I am very new to Linux. Every time I think I am making progress I get stumped again.

using Ubuntu 6.10. Went to software sources, third party, added the SS address. Opened synaptic, found the SS listed, checked, apply. Progress bar says downloading, then says installing SS, everything going great. Trouble is, I can not find SS to open and configure it.

From everything I could see, it was downloaded and installed, but I can not find anything.

I tried a sudo command (my first try at any command linde) that I saw in another post, but got message that no such command existed (or something to that affect).

Any help will be appreciated. I am trying to see if I can migrate to Linux, but sure can't do it if I can't use my SB!

pfarrell
2007-05-13, 17:33
mgh wrote:
> I tried a sudo command (my first try at any command line) that I saw
> in another post, but got message that no such command existed (or
> something to that affect).

You should see something like this

sudo
usage: sudo -K | -L | -V | -h | -k | -l | -v
usage: sudo [-HPSb] [-p prompt] [-u username|#uid]
{ -e file [...] | -i | -s | <command> }


Linux and other unix systems are very, very picky about typing, case, etc.

Show us exactly what you typed and exactly what you got as a response.


> Any help will be appreciated. I am trying to see if I can migrate to
> Linux, but sure can't do it if I can't use my SB!

While some of the newer distros make it mostly possible to use without
using the command shell, some things always require command
so you will need to be able to do basic things like
'cd' and 'ls' and 'pwd'
to survive. Its worth it.

Pat


--
Pat
http://www.pfarrell.com/music/slimserver/slimsoftware.html

Mark Lanctot
2007-05-13, 18:08
When I downloaded SlimServer in Ubuntu, everything just worked. SlimServer could be running - there was nothing on the command line I had to do to it.

Try opening localhost:9000 in your web browser.

mgh
2007-05-13, 19:35
OK, making progress.

I was able to open localhost:9000, and got the familiar SS page. Unfortunately it could not find my SB.

Also, when installing on XP, it lead me through the steps to point to my music folder. It did not do this when I opened localhost, and I have been unable to configure the folder for SS to scan.

Will I have to configure my SB differently depending on whether I am using XP or Ubuntu?

Also, I am used to "starting slim server" from my system tray in XP. Do I need to find a way to do that with Ubuntu or should SS start automatically?

Thanks for the help. Hope I am getting close.

Mark Lanctot
2007-05-13, 19:45
OK, making progress.

I was able to open localhost:9000, and got the familiar SS page. Unfortunately it could not find my SB.

Have you pointed your SB to it yet? The server's IP or name has probably changed.


Also, when installing on XP, it lead me through the steps to point to my music folder. It did not do this when I opened localhost, and I have been unable to configure the folder for SS to scan.

Open your File Browser and navigate to the files. At the top left you can select between icon view and text view - select text view and when you see your files, copy the text line and paste it into SS - Server Settings - Music Folder.

Check permissions - SS may not have read permission on the files. I'm trying to figure out the best way to do this myself, but an insecure way is in a command terminal, "sudo chmod -R 777 <your music folder path>". 777 gives read, write and execute access to everyone. This is not secure at all. Ideally you'd allow only root, yourself and SlimServer read/write access, read-only for everyone else, but I haven't been able to figure out how to do this.


Also, I am used to "starting slim server" from my system tray in XP. Do I need to find a way to do that with Ubuntu or should SS start automatically?

There's no system tray tool in the Linux version, but it doesn't matter. It always runs, and it always starts at startup. If you ever want to stop it: "sudo /etc/init.d/slimserver stop" and to start "sudo /etc/init.d/slimserver start".

snarlydwarf
2007-05-13, 21:06
Check permissions - SS may not have read permission on the files. I'm trying to figure out the best way to do this myself, but an insecure way is in a command terminal, "sudo chmod -R 777 <your music folder path>". 777 gives read, write and execute access to everyone. This is not secure at all. Ideally you'd allow only root, yourself and SlimServer read/write access, read-only for everyone else, but I haven't been able to figure out how to do this.


Slimserver doesn't need to write to files (excepting playlists). So what I do:

chown -R me ~/music
find ~/music -type d -exec chmod 755 {} \;
find ~/music -type f -exec chmod 644 {} \;

The playlist directory is:
chmod 1777 ~/playlists

That lets anyone write there, but only the owner can modify/delete what they own. (Like /tmp.)

Mark Lanctot
2007-05-14, 05:45
Slimserver doesn't need to write to files (excepting playlists). So what I do:

chown -R me ~/music
find ~/music -type d -exec chmod 755 {} \;
find ~/music -type f -exec chmod 644 {} \;

The playlist directory is:
chmod 1777 ~/playlists

That lets anyone write there, but only the owner can modify/delete what they own. (Like /tmp.)

Hmm, tried this and it's a bit of a chicken-and-egg thing. If I run the chown and find command as anything other than root (though "sudo") it won't allow me due to incorrect permissions.

But when I do these commands as root, they run fine but all the permissions are changed to root only? I am no longer permitted to place files in the music directory, only root can do that.

mgh
2007-05-14, 17:59
Well I'm still not there.

I've never used a router before. In XP it was pretty simple, I really did not have to do a thing, the SB found the wireless network, all I had to do was set a password for encryption.

So. Do I need to go in and set up my router again while running Ubuntu instead of running XP? Am I going to have to change router settings every time I boot to a different OS?

I have gone into the wireless network set up on my SB, but it will not find the network. It assigns an IP address automatically, then eventually asks for the IP address of the SS. The IP address that I can see on the SS settings doesn't work.

Also, I followed the instructions to get the file path for my music folder (thanks for those instructions, I did not know how to do that with Ubuntu), copied and pasted, tried to scan, and get the message "opps, media/simpledrive/music does not appear to be a valid directory". The simpledrive is a USB external HHD. I can play music off the external drive with Totem.

I really want to like Linux, and I will keep trying, but you have to admit, MS does make it simple.

Thanks for your efforts. I am a NOOB with Linux, and just trying to see if I can get it to do everything I need/want my computer to do.

snarlydwarf
2007-05-14, 18:07
Hmm, tried this and it's a bit of a chicken-and-egg thing. If I run the chown and find command as anything other than root (though "sudo") it won't allow me due to incorrect permissions.

But when I do these commands as root, they run fine but all the permissions are changed to root only? I am no longer permitted to place files in the music directory, only root can do that.

Only root can chown... so, yes, you need to be root to do that... but you may not need to do that at all. My point is that the music files are owned by me (not as slimserver, but my real uid). This is so I can muck with tags all I want, I can rip, delete and otherwise change things.

so: "chown -R me ..." to make them mine in case someone/something else thinks they wanted them.

The find/exec/chmod is to change the permissions on each file so that I can rwx them, but group and other can only read (and x directories). If the files/directories are owned by you, this shouldn't create any problems, it should just tidy up permissions.

Mark Lanctot
2007-05-14, 20:48
I've never used a router before. In XP it was pretty simple, I really did not have to do a thing, the SB found the wireless network, all I had to do was set a password for encryption.

So. Do I need to go in and set up my router again while running Ubuntu instead of running XP? Am I going to have to change router settings every time I boot to a different OS?

No. Your router doesn't care what OS you run, it just passes packets back and forth. As long as your OS can feed it and receive packets from it properly, everything is fine.


I have gone into the wireless network set up on my SB, but it will not find the network. It assigns an IP address automatically, then eventually asks for the IP address of the SS. The IP address that I can see on the SS settings doesn't work.

So, we know SlimServer is running. And the address that SS reports doesn't work in the SB?

You say the SB gets assigned an address automatically. Is it an address that makes sense? Not a 169.x address but a 192.168.x address? Can you connect to SqueezeNetwork? Can you connect wired?


Also, I followed the instructions to get the file path for my music folder (thanks for those instructions, I did not know how to do that with Ubuntu), copied and pasted, tried to scan, and get the message "opps, media/simpledrive/music does not appear to be a valid directory". The simpledrive is a USB external HHD. I can play music off the external drive with Totem.

You will get this message when the path is valid but the permissions aren't right. Try "sudo chmod -R 777 /media/simpledrive/music".

What is "simpledrive" formatted as? FAT? If so, FAT doesn't support permissions, chmod will fail, but you should be able to read/write to the directory anyway.

Go to the directory, select one of the files, right-click and select "Permissions". Is it set to your user name or everyone? It can't be set as root.


I really want to like Linux, and I will keep trying, but you have to admit, MS does make it simple.

Simple, but insecure by default. The reason we have to futz around with these permissions is that all files but your /home directory are locked down and available to root only. Even if someone were to break into your system they could not alter files. In fact, even if someone was to have physical access to your keyboard, they could not alter files outside of /home unless they had your root password. Microsoft has gone to great heroics in Vista to try to approach this level of security, and they're still not there yet.


Thanks for your efforts. I am a NOOB with Linux, and just trying to see if I can get it to do everything I need/want my computer to do.

You only have to do this once...

bukharin
2007-05-15, 03:55
Also, I followed the instructions to get the file path for my music folder (thanks for those instructions, I did not know how to do that with Ubuntu), copied and pasted, tried to scan, and get the message "opps, media/simpledrive/music does not appear to be a valid directory". The simpledrive is a USB external HHD. I can play music off the external drive with Totem.


You will get this message when the path is valid but the permissions aren't right. Try "sudo chmod -R 777 /media/simpledrive/music".

Hold on...

If you can play the music with Totem then permissions may not be the problem. More likely the problem is that you haven't set the correct directory in SlimServer. For example, is it really set as "media/simpledrive/music"? If so, try changing it to "/media/simpledrive/music" (note the extra /)

To sort out the permissions issue, try this command: "ls -l /media/simpledrive" and see what the permissions actually are on "/media/simpledrive/music"

mgh
2007-05-15, 18:41
These are the messages I get from those two commands.

mike@mike-desktop:~$ sudo chmod -R777/media/simpledrive/music
Password:
chmod: invalid option -- 7
Try `chmod --help' for more information.

mike@mike-desktop:~$ ls-l/media/simpledrive
bash: ls-l/media/simpledrive: No such file or directory

Sorry about my typing, the original file path did have the / before media.

My SB does connect to Squeeze Network.

When I try to set up SB, it will ask me to choose my wireless network. There is one there, so I select it, otherwise it asks for my wireless network name (SSID). Eventually I can get to a screen asking me to specify the SS IP address, with an entry like this: 000.000.000.000

I will have to boot up in XP to see if I can run the router set up to check the SSID, but I would think it is OK as I am fine playing while running XP.

I get a little lost running through all the set up menus in the SB. If there is something obvious I am missing that you can see, let me know.

Thanks for your efforts.

Mark Lanctot
2007-05-15, 18:58
These are the messages I get from those two commands.

mike@mike-desktop:~$ sudo chmod -R777/media/simpledrive/music
Password:
chmod: invalid option -- 7
Try `chmod --help' for more information.

You need a space between the "R" and the first "7".


mike@mike-desktop:~$ ls-l/media/simpledrive
bash: ls-l/media/simpledrive: No such file or directory

Similarly, you need a space between the "ls" and the "-l", plus a space between the "-l" and the "/media/"etc.

mgh
2007-05-15, 19:58
now this:

mike@mike-desktop:~$ sudo chmod -R 777/media/simpledrive/music
Password:
chmod: missing operand after `777/media/simpledrive/music'
Try `chmod --help' for more information.
mike@mike-desktop:~$ sudo chmod -R 777 /media/simpledrive/music
chmod: cannot access `/media/simpledrive/music': No such file or directory
mike@mike-desktop:~$ ls -l /media/simpledrive
ls: /media/simpledrive: No such file or directory
mike@mike-desktop:~$ ls -l /media/simpledrive/music
ls: /media/simpledrive/music: No such file or directory
mike@mike-desktop:~$

Thanks

Mark Lanctot
2007-05-15, 20:26
now this:

mike@mike-desktop:~$ sudo chmod -R 777/media/simpledrive/music
Password:
chmod: missing operand after `777/media/simpledrive/music'
Try `chmod --help' for more information.
mike@mike-desktop:~$ sudo chmod -R 777 /media/simpledrive/music
chmod: cannot access `/media/simpledrive/music': No such file or directory
mike@mike-desktop:~$ ls -l /media/simpledrive
ls: /media/simpledrive: No such file or directory
mike@mike-desktop:~$ ls -l /media/simpledrive/music
ls: /media/simpledrive/music: No such file or directory
mike@mike-desktop:~$

Thanks

Are you sure the drive is mounted? Can you navigate to it in your file manager GUI? If so, what does the text description of the path say?

SteveEast
2007-05-15, 20:58
now this:

mike@mike-desktop:~$ sudo chmod -R 777/media/simpledrive/music
Password:
chmod: missing operand after `777/media/simpledrive/music'
Try `chmod --help' for more information.
mike@mike-desktop:~$ sudo chmod -R 777 /media/simpledrive/music
chmod: cannot access `/media/simpledrive/music': No such file or directory
mike@mike-desktop:~$ ls -l /media/simpledrive
ls: /media/simpledrive: No such file or directory
mike@mike-desktop:~$ ls -l /media/simpledrive/music
ls: /media/simpledrive/music: No such file or directory
mike@mike-desktop:~$

Thanks

You need a space after the 777 for the chmod to work - whoops, now I see you've alreaddy tried that. But the ls command seems to indicate that, as Mark says, the drive isn't mounted. Try the "df" command and show us the output.

Steve.

mgh
2007-05-16, 17:11
here is the df command results:

mike@mike-desktop:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hdb4 10080520 2673420 6895032 28% /
varrun 257168 88 257080 1% /var/run
varlock 257168 0 257168 0% /var/lock
procbususb 10240 208 10032 3% /proc/bus/usb
udev 10240 208 10032 3% /dev
devshm 257168 0 257168 0% /dev/shm
lrm 257168 17580 239588 7% /lib/modules/2.6.17-11-generic/volatile
/dev/hda1 32018 6934 25084 22% /media/hda1
/dev/hda2 20482872 11643928 8838944 57% /media/hda2
/dev/hda5 25599544 25284352 315192 99% /media/hda5
/dev/hda6 25599544 19771140 5828404 78% /media/hda6
/dev/hda7 6401868 187560 6214308 3% /media/hda7
/dev/hdb5 20208740 580056 18602136 4% /media/hdb5
/dev/hdb6 11021408 1587800 8873748 16% /media/hdb6
/dev/sda1 244196000 115244660 128951340 48% /media/SimpleDrive

I have heard the term "mount" the drive, though I do not know what that means. I can open the simpledrive (USB external HHD), navigate through it, and play FLAC files that are stored on the drive.

the file path name is /media/SimpleDrive. Within that, I have all my music in a folder named "music". All I have tried is what was suggested in another post, that is, navigate to the folder, copy and past the file path in my slim server settings under home/server settings/basic settings in music folder. So what I have tried is pasting /media/SimpleDrive/music.

Also, booted up in XP, SS couldn't find the SB because of all the messing around I was doing last night. No big deal, go to set up, a couple of steps later and I am connected. I just can't figure out what I need to do differently for Ubuntu SS to find the SB.

Thanks for all the help.

Guess I better find out what all these command lines are for :). 'course with Ubuntu I just rarely need them.

SteveEast
2007-05-16, 17:33
Ahhh, it's /media/SimpleDrive rather than /media/simpledrive. Case is significant in Linux.

Since you say you tried pasting *exactly* /media/SimpleDrive/music into SS, we should probably look at the permissions next:

ls -la /media
ls -l /media/SimpleDrive
ls -l /media/SimpleDrive/music

Steve.

Mark Lanctot
2007-05-16, 19:48
I have heard the term "mount" the drive, though I do not know what that means. I can open the simpledrive (USB external HHD), navigate through it, and play FLAC files that are stored on the drive.

In Windows, you have the old "c:" drive, then other drives with similar letters (remember how floppies always were "a:" drives?)

Linux is much more flexible than that. It really doesn't care which drives go where, nor is letting you know a big priority - because most of the time you really don't. If Ubuntu was allowed to use all those partitions you have, it would probably have mingled them all up into your root "/" or your /home folder. It didn't because you probably had existing data on these partitions or they were NTFS formatted. You actually have to look through the df command, fstab and the System Monitor to discover which folders the drives are connected to, i.e. their "mount point".

Mounting a drive tells the OS where to place it in your combined filesystem. This can be convenient because the end result is so seamless - for example, I have a 250 GB drive for music. In Windows it was a separate drive with a separate drive letter. In Linux I mounted it to "/home/music". This can also be confusing if you don't know what's going on, but I did this specifically in /etc/fstab:


/dev/hdb2 /home/music ext3 defaults 0 2

With external drives, there is an automount program (autofs?) that will mount drives on-the-fly, outside of what fstab controls. It puts external drives in /media and mounts them to a folder with the same name as the volume name - in your case, SimpleShare. When you unplug the drive, the folder in /media automagically disappears. (Be careful though, a bug in Feisty will not unmount it properly and if you're writing data while you yank it, the volume will be corrupted. You should really "sudo umount /dev/sda1" to unmount it, then yank.)


Guess I better find out what all these command lines are for :). 'course with Ubuntu I just rarely need them.

That's due to clever coding on Ubuntu's part, but Linux is really all about the command line. The GUI is just eye candy. It's like early Windows - Windows was built as a GUI for DOS. This is no longer the case. In Windows 2000 and later, the GUI became the OS. However in Linux the real OS is still behind the scenes on the command line, the GUI is just programs that run on the command line to make pretty windows.

I am growing to appreciate the power of the command line with certain command-line programs that are simple yet incredibly powerful like rsync and diff.

mgh
2007-05-16, 21:36
sorry, had a minor emergency, so late getting back.

Here are the latest results.

mike@mike-desktop:~$ ls -la /media
total 60
drwxr-xr-x 12 root root 4096 2007-05-16 17:48 .
drwxr-xr-x 21 root root 4096 2007-05-11 18:58 ..
lrwxrwxrwx 1 root root 6 2007-05-10 12:19 cdrom -> cdrom0
drwxr-xr-x 2 root root 4096 2007-05-10 12:19 cdrom0
drwxr-xr-x 2 root root 4096 2007-05-10 12:19 cdrom1
drwxrwx--- 3 root plugdev 16384 1969-12-31 17:00 hda1
dr-xr-x--- 1 root plugdev 4096 2007-05-15 19:59 hda2
dr-xr-x--- 1 root plugdev 4096 2007-05-09 15:45 hda5
dr-xr-x--- 1 root plugdev 4096 2007-05-09 15:45 hda6
dr-xr-x--- 1 root plugdev 4096 2007-05-14 20:54 hda7
drwxr-xr-x 20 root root 4096 2007-05-13 19:18 hdb5
drwxr-xr-x 14 root root 4096 2007-05-09 14:48 hdb6
dr-x------ 1 mike mike 4096 2007-05-09 15:45 SimpleDrive
mike@mike-desktop:~$ ls -l /media/SimpleDrive
total 16
dr-x------ 1 mike mike 4096 2007-05-08 18:38 back up
dr-x------ 1 mike mike 8192 2007-05-09 17:20 music
dr-x------ 1 mike mike 0 2007-04-16 18:05 RECYCLER
dr-x------ 1 mike mike 4096 2007-04-15 18:14 System Volume Information
mike@mike-desktop:~$ ls -l /media/SimpleDrive/musci
ls: /media/SimpleDrive/musci: No such file or directory
mike@mike-desktop:~$ ls -l /media/SimpleDrive/music
total 96
-r-x------ 2 mike mike 2898 2007-05-09 15:30 128 samples.m3u
-r-x------ 2 mike mike 2732 2007-05-09 17:20 320 samples.m3u
dr-x------ 1 mike mike 4096 2007-04-29 11:14 ALAC
dr-x------ 1 mike mike 4096 2007-04-28 14:32 American Idiot
-r-x------ 2 mike mike 1994 2007-05-06 07:38 Anthony Newman - Bach - 128.m3u
-r-x------ 2 mike mike 1994 2007-05-06 07:39 Anthony Newman - Bach - 320.m3u
-r-x------ 2 mike mike 2045 2007-05-06 07:34 Anthony Newman - Bach - Flac.m3u
dr-x------ 1 mike mike 32768 2007-04-19 09:21 FLAC
dr-x------ 1 mike mike 0 2007-04-29 11:29 folder shortcuts
-r-x------ 2 mike mike 964 2007-05-04 18:42 Holding up Half The Sky.m3u
-r-x------ 2 mike mike 1090 2007-05-05 17:42 holding up the sky Women in Reggae.m3u
-r-x------ 2 mike mike 4980 2007-05-01 20:56 rock singles.m3u
-r-x------ 2 mike mike 2289 2007-04-28 20:09 semi-country.m3u
-r-x------ 2 mike mike 738 2007-05-08 21:19 Shortcut to 128-Goodbye Yellow Brick Road [Disc 1].lnk
-r-x------ 2 mike mike 738 2007-05-08 21:19 Shortcut to 128-Goodbye Yellow Brick Road [Disc 2].lnk
-r-x------ 2 mike mike 738 2007-05-08 21:19 Shortcut to 320-Goodbye Yellow Brick Road [Disc 1].lnk
-r-x------ 2 mike mike 738 2007-05-08 21:19 Shortcut to 320-Goodbye Yellow Brick Road [Disc 2].lnk
-r-x------ 2 mike mike 401 2007-04-29 11:17 Shortcut to rock.lnk
-r-x------ 2 mike mike 429 2007-04-28 19:16 Shortcut to semi-country.lnk
mike@mike-desktop:~$

Again, many thanks for all of your efforts. I appreciate you taking the time to explain some of these Linux things.

bukharin
2007-05-17, 06:35
mike@mike-desktop:~$ ls -l /media/SimpleDrive
total 16
dr-x------ 1 mike mike 4096 2007-05-08 18:38 back up
dr-x------ 1 mike mike 8192 2007-05-09 17:20 music


This is the problem. The "music" directory is owned by the user "mike", and belongs to the group "mike".

The d means directory

The r-x means that the user ("mike") can read files in the directory (r), can't write anything to the directory (- instead of w), and can list the contents of the directory (x)

The first --- means that members of the "mike" group have no access to the folder, and the second --- means that all other users also have no access.

Since slimserver is probably running as the user "slimserver" and doesn't belong to the "mike" group, it fits into the category of "all other users" and therefore doesn't have access to the drive.

To fix this, you need to adjust the automount system to mount that drive with a less secure umask (it's currently set to 200; try changing to 222). In English, that means that when the drive is mounted, the permissions will be more relaxed (specifically, a umask of 222 gives permissions of r-xr-xr-x) and slimserver will be able to access the music. I'm not sure how to do this in ubuntu, but it's probably not too hard; I think Mark did something similar recently so he may be able to help.

Alternatively, if the drive's permanently plugged in, you don't actually need to automount it - you could mount it at boot time. This could be as simple as adding this entry into /etc/fstab:
/dev/sda1 /media/SimpleDrive vfat users,umask=222 0 0

However, I recommend that you look at the automount permissions - it's more hassle, but it won't break if another hot-pluggable device becomes /dev/sda1

Mark Lanctot
2007-05-17, 06:59
I think the missing part of the whole thing - mgh, you carried out "sudo chmod -R 777" on "/media/simpledrive/music", not "/media/SimpleDrive/music" (note case!) So try:


sudo chmod -R 777 /media/SimpleDrive/music

mgh - highlight that line, right-click, copy, go into terminal, right-click and paste. That will avoid spacing errors and case errors.

777 is insecure - it gives everyone access to do anything, including delete, but it works. I would like to use something a little more restrictive, i.e. give root and you read/write/execute, slimserver read only, and nothing for everyone else, but I haven't figured out how to do that, mostly because I don't know how to find which groups my system has and which group slimserver is in.

bukharin
2007-05-17, 07:17
I don't know how to find which groups my system has and which group slimserver is in.

Look at /etc/group

Mark Lanctot
2007-05-17, 08:08
Look at /etc/group

Thanks - interesting but slimserver isn't listed?

snarlydwarf
2007-05-17, 09:05
On my system (from /etc/passwd):

slimserver:x:110:65534:SlimServer,,,:/usr/share/slimserver:/bin/false

The numeric ID of the slimserver user is 110, and the default group is 65534 (nogroup).

You would need to create a new group (on Debian: "groupadd slimserver" would do it), then assign the slimserver user to the slimserver group (again, on debian: "usermod -g slimserver slimserver" would do it).

That said, my example shows I don't do that.

I give everyone read privs (and exec on directories). Groups get confusing very quickly and maintaining files in the group can be tricky, especially when using SMB or something to copy files over.

mgh
2007-05-17, 18:06
Hi again,

sudo chmod -R 777 /media/SimpleDrive/music got me a whole bunch of this:

chmod: changing permissions of `/media/SimpleDrive/music/FLAC/PowerAMP/Elvis Costello/My Aim Is True/Elvis Costello - My Aim Is True [Rhino Bonus Disc] Disc 1 - 08 - Less Than Zero.flac': Read-only file system
chmod: changing permissions of `/media/SimpleDrive/music/FLAC/PowerAMP/Elvis Costello/My Aim Is True/Elvis Costello - My Aim Is True [Rhino Bonus Disc] Disc 1 - 09 - Mystery Dance.flac': Read-only file system
chmod: changing permissions of `/media/SimpleDrive/music/FLAC/PowerAMP/Elvis Costello/My Aim Is True/Elvis Costello - My Aim Is True [Rhino Bonus Disc] Disc 1 - 10 - Pay It Back.flac': Read-only file system

This is actually pretty embarrassing, as I do not know what or why I am doing these things. I have much to learn. However, it "seems" obvious that what I am trying to accomplish with the above command is to allow permissions to these files, hopefully to get SS to "see" the drive and files.

So far, still no go. So I again copied and pasted the file path /media/SimpleDrive/music to SS setting, music folder, with the same result of "opps, no such directory".

So would the next step be along the lines of what bukharin is describing?

I also of course need to be able to write to this external drive. I am still ripping and adding to my digital music collection, and will store it on this drive.

I appreciate all the patience here. It is obvious I need to get a handle on what commands do, and I look forward to it.

I would love to start a thread, maybe at Linuxquestions, about Linux and the ability of a NOOB to use it. My VERY short experience with Ubuntu and PCLinuxOS is that it will be quite easy to do the easy stuff, emailing, WWW and so on (I'm also holding out to see what it will take to hot-sync palm OS with Evolution), however, I can not describe what I am going through here as easy. I was extremely impressed with how easy it was for me to install SS using the info from slimdevices page and synaptic, that was really slick!

I don't want to sound like I am complaining, I hope I can learn something new, but from reading through some of the Linux forums, there seems to be some talk about whether Linux is even yet ready for the masses. Sorry about that, this is definitely something for another thread, there is quite a lot going on here as it is.

bukharin
2007-05-17, 19:15
So would the next step be along the lines of what bukharin is describing?

Yes :-)

I haven't had time to look into this yet, but I'm quite sure it's a very simple case of changing a umask=277 to umask=022 somewhere in a config file for automounting external drives. If you're motivated, search ubuntu forums for "automount permissions", or do "grep -R umask /etc/*" to see which config file/s might be relevant.

(One thing to consider, though - is the drive formatted as vfat or ntfs? If it's ntfs, writing won't work without jumping through additional hoops. If you haven't futzed with it, it should be vfat.)


I would love to start a thread, maybe at Linuxquestions, about Linux and the ability of a NOOB to use it. My VERY short experience with Ubuntu and PCLinuxOS is that it will be quite easy to do the easy stuff, emailing, WWW and so on (I'm also holding out to see what it will take to hot-sync palm OS with Evolution), however, I can not describe what I am going through here as easy. I was extremely impressed with how easy it was for me to install SS using the info from slimdevices page and synaptic, that was really slick!

Yes, that's generally true of Linux vs Windows. Linux is harder to get working, but works better once you've got it working. The default in Windows is to value ease of use over security; the default in Linux is the opposite. Windows automatically gives everyone write access to the external drive; this is very insecure and could lead to data loss, installation of viruses etc. Linux prevents this, but sometimes goes too fat the other way.

In my opinion the default settings in Ubuntu are too restrictive - it's primarily a desktop distro for new users, so it's probably unnecessary to make the default permissions on external drives so restrictive.

mgh
2007-05-17, 19:43
I have this weekend off, so will try looking around.

Anyone with suggestions for good resources for me to learn about Linux commands?

Everything I have, with the exception of 4 partitions for installation of PCLinuxOS and Ubuntu are NTFS. I got some good help in another thread about formatting, just have not figured out yet what will work best while I am still working with XP also.

For the time being, I can still rip in XP, and save to my external. I found out I could not save an OpenOffice doc to NTFS, so may need to make some decisions sooner than later. XP disc management will not let me make a 5th partition on the drive I have the Linux distros on. Maybe my next step will be using the Ubuntu install disc to try and format the unpartitioned space. I don't suppose Linux will format fat32, so I suppose I'll try ext3 and see what I can do to get XP to read/write to that. I believe someone told me there was a driver for windows to do that.

Kind of feel like I am stuck in the middle right now, not sure when to just commit to Linux, and make XP the secondary.

Thanks a lot for the help.

mgh
2007-05-17, 19:54
/etc/mtab:/dev/sda1 /media/SimpleDrive ntfs rw,nosuid,nodev,uid=1000,gid=1000,umask=077,iochar set=utf8 0 0

You know, this could be fun if I can learn my way around.

bukharin
2007-05-18, 02:12
/etc/mtab:/dev/sda1 /media/SimpleDrive ntfs rw,nosuid,nodev,uid=1000,gid=1000,umask=077,iochar set=utf8 0 0

You know, this could be fun if I can learn my way around.

Yes, it's the beginning of the addiction... ;-)

That umask=077 needs to be changed to 022. However, you can't change it in /etc/mtab - that file just lists what's mounted, rather than controlling how they're mounted. It might be worth trying to remount it manually, just to confirm that this is the only problem:
umount /media/SimpleDrive
mount /dev/sda1 /media/SimpleDrive -t ntfs -o rw,nosuid,nodev,uid=1000,gid=1000,umask=022,iochar set=utf8

(there shouldn't be a space in "iocharset", but the forum seems to be displaying it with a space for some buggy reason)

If that works then you can look into getting the system to mount it properly in the 1st place.

Mark Lanctot
2007-05-18, 07:09
Anyone with suggestions for good resources for me to learn about Linux commands?

Any time you have a question about a command, type "man <command name>". The description that comes up is complete but can sometimes be complicated. You may also want to google for the command name, there are sites out there with simplified command descriptions.

After a while you'll start to notice a pattern. Commands usually are entered as "command -options (or --options) files".


I found out I could not save an OpenOffice doc to NTFS, so may need to make some decisions sooner than later.

OOo doesn't care what drives it uses, that's up to the OS. From within Windows you can write to FAT16, FAT32 and NTFS drives. ext3 support can be added with a driver, http://www.fs-driver.org/

Linux has a huge variety of filesystems to chose from: reiserfs, XFS, JFS, ZFS (new), ext2 and ext3. ext3 is recommended for stability and robustness at the expense of speed. I've seen an Ubuntu forum thread where people have experimented with XFS which is much faster but not as secure.

I think your issue is that the drive is formatted in NTFS. Linux can read NTFS but cannot write to it, hence the "read only" errors. You need to install "ntfs-3g" to write to it.

At first I thought Linux was great out of the box but it was very complicated to change anything. Now I'm starting to realize this isn't quite the case since you can change ANYTHING and there's a huge amount of pre-configured software packages for you to choose from. After a while, you start to get to know the commands as you spot repeating patterns. Keep watching the commands people suggest to you and look for patterns - things will start to click.

Oh and BTW to mount the drive, don't use mtab as that's not permanent. Use /etc/fstab as that is permanent. Modify it using "sudo gedit /etc/fstab". Add:


/dev/sda1 /media/SimpleDrive ntfs umask=222,utf8 0 0

Save fstab. Unmount sda1 - "sudo umount /dev/sda1" Then re-mount drives using fstab, "sudo mount -a". Note when you install ntfs-3g, you may have to change "ntfs" in fstab to "ntfs-3g". I'm not sure, I never used ntfs-3g.

bukharin
2007-05-18, 14:18
Oh and BTW to mount the drive, don't use mtab as that's not permanent. Use /etc/fstab as that is permanent. Modify it using "sudo gedit /etc/fstab". Add:


/dev/sda1 /media/SimpleDrive ntfs umask=222,utf8 0 0


That may work, but the problem is that the external hard drive is not guaranteed to remain /dev/sda1. If, for example, you plug in a USB thumb drive or a digital camera before plugging in the external hard drive, then that device will become /dev/sda1 and the external drive, when plugged in, might be /dev/sdb1. Assuming it will always be /dev/sda1 could lead to (big) problems down the track.

That's why I suggested mounting it manually to see if that fixes the problem, and then looking into Ubuntu's automounting system so that you can fix the problem at its root.

Mark Lanctot
2007-05-18, 14:31
That may work, but the problem is that the external hard drive is not guaranteed to remain /dev/sda1. If, for example, you plug in a USB thumb drive or a digital camera before plugging in the external hard drive, then that device will become /dev/sda1 and the external drive, when plugged in, might be /dev/sdb1. Assuming it will always be /dev/sda1 could lead to (big) problems down the track.

That's why I suggested mounting it manually to see if that fixes the problem, and then looking into Ubuntu's automounting system so that you can fix the problem at its root.

Good one, I never thought of that. I don't use a thumb drive so it's never come up for me.

BTW Ubuntu 7.04 has problems with removable media in that you can't remove it - it thinks it's like a CD and will only allow you to "eject" it from the desktop, which won't work for a removable drive. To avoid the risk of filesystem errors, it should be unmounted using "sudo umount" and the drive /dev/hdX or dev/sdX path.

mgh
2007-05-19, 09:01
this is the reply I got from the command line:

mike@mike-desktop:~$ sudo mount /dev/sda1 /media/SimpleDrive -t ntfs -o rw,nosuid,nodev,uid=1000,gid=1000,umask=022,iochar set=utf8
Password:
mount: /dev/sda1 already mounted or /media/SimpleDrive busy
mount: according to mtab, /dev/sda1 is already mounted on /media/SimpleDrive
mike@mike-desktop:~$

So this tells me the external drive is mounted?

Thanks

stroom
2007-05-19, 13:53
this is the reply I got from the command line:

mike@mike-desktop:~$ sudo mount /dev/sda1 /media/SimpleDrive -t ntfs -o rw,nosuid,nodev,uid=1000,gid=1000,umask=022,iochar set=utf8
Password:
mount: /dev/sda1 already mounted or /media/SimpleDrive busy
mount: according to mtab, /dev/sda1 is already mounted on /media/SimpleDrive
mike@mike-desktop:~$

So this tells me the external drive is mounted?

Thanks

the external drive was already mounted (but not with the correct umask)
you have first to unmount it : umount /media/SimpleDrive
and then remount it with your mount command with correct umask as you did

mgh
2007-05-19, 15:38
Ok sorry about this.

Is there a consensus here? Do I need to change the umask to change permissions, or add SS as a user. Either way I am still at a loss as how to accomplish.

When I tried /etc/group, I get this:

mike@mike-desktop:~$ sudo /etc/group
sudo: /etc/group: command not found

I have tried to reread this thread, but I am getting lost.

I have read some Ubuntu threads about permissions, and it seems NTFS and permissions is tricky or impossible.

Still have not found any help on automount permissions.

This is frustrating because I like Ubuntu, but can't use it if I can't get SB to work.

Wondering if I need to reformat my external to something Linux likes, but then would have to make sure XP could use it, and on and on it goes.

Thanks for the help.

bukharin
2007-05-19, 17:35
You need to change the umask. The current permissions are too restrictive, and woudln't work even if you messed around with slimserver's group setting.

In terms of remounting the drive, first you need to unmount it:
sudo umount /media/SimpleDrive

Then remount it with the command you already tried

mgh
2007-05-19, 19:52
Sorry, I got lost here. I will hazard a guess you are writing of the command you gave me in post # 30. I will try the umount and mount.

Thanks again.

bukharin
2007-05-19, 19:57
That's right, but remember to add sudo at the front (I'm not used to sudo - I just do su and live dangerously :-)

mgh
2007-05-19, 20:12
Oh my gosh bukharin, you finally pound it in to me! That worked, SS is scanning my files now.

Much of my difficulty here still comes down to the fact that I was only copying what you kind people were helping me to do, without understanding much of it.

If you don't mind, would you refresh my memory on the umask issue? What does it mean, and where was it when it was too restrictive? If I understand your command line, I reset the umask to 022?

And how in the world do you get to the point where you can write a command line that long, and it works?

Many thanks for all the help from everyone.

Now I need to restart this thread. The original problem was that SS can not find my SB, and it still can't.

bukharin
2007-05-19, 23:39
Glad to hear it. I explained a little about umasks in an earlier thread:
http://forums.slimdevices.com/showpost.php?p=196941&postcount=11

I'll cut, paste and update the relevant bits:

The way the umask works is:
- the first number refers to the owner of the file
- the second number refers to members of the file's group
- the third number refers to everyone else ("world")

Normal file permissions are as follows:
- 4 = r = read
- 2 = w = write
- 1 = x = execute (file), or list contents (directory)

So to make a folder & its contents readable and browsable by everyone, but only writable by the owner, you'd want permissions of 755 (ie 4+2+1 for the owner, and 4+1 for group and world). If you did "ls -l", the 755 would show up as rwxr-xr-x.

You need to understand the above before you think about umasks.

Now, the trick is that the umask works in the opposite direction - it tells the filesystem what people AREN'T allowed to do. You need to subtract the umask from 777 to get the final permissions. So your umask of 022 means:
777 - 022 = 755 = rwxr-xr-x = user has full permissions (7=4+2+1), but group and world are not allowed to write/modify files. This is generally what you'd want for a setup such as yours.

In my opinion, 022 should be the default umask for external drives in Ubuntu. It's just too hard for new users otherwise. In any case, what you need to do now is configure Ubuntu so that its default umask for external drives is indeed 022. If it's anything like my Gentoo system, this would be in the ivman configuration (ivman is what actually mounts the devices on behalf of the user).

On my system, the relevant config file is at:
/etc/ivman/IvmConfigBase.xml

In that file, there's the following:
<!--
<ivm:Option name="umask" value="002" />
-->

If it's the same on your system, try uncommenting that line (by removing the <!-- and -->) and change the value to 022. You'd then need to remount the drive, and hopefully the permissions would be correct.

stroom
2007-05-20, 00:54
mgh,

If you use Ubuntu 7.04, the mounting of the external disk will be done with the correct umask "out of the box".

mgh
2007-05-20, 07:04
Thanks for the explanation bukharin, I appreciate that and will keep it around.

stroom: Somewhere in my searching around before deciding on a distro, Ubuntu 6.10 was recommended. I don't remember now what the person said, I believe their recommendation was that it was very stable, and a good place for a beginner to start. Care to give me your view on advantages/disadvantages to an upgrade?

Thank You

stroom
2007-05-20, 07:36
Ubuntu 6.06 LTS - Supported to 2009
Ubuntu 7.04 - Supported to 2008
The "LTS" version of Ubuntu receives long-term support. 3 years for desktop versions and 5 years for server versions.
So the 6.06 is indeed in theory more stable and longer supported. However I saw that Ubuntu 7.04 will be installed on DELL computers, so I think that the stability is ok (2 months after release).
See here for some of the new features in 7.04: http://www.ubuntu.com/getubuntu/releasenotes/704tour
In principle things are only getting easier to migrate from windows with each new release. I had 'problems' like you with mounting in 6.06 which worked out of the box in 7.04.
The only disadvantage for upgrade that I see is to have to reconfigure your system again (like loading codecs, fonts, installing slimserver etc;). It is possible to upgrade by the update manager, however I had always issues with the upgrades this way and I did a fresh install of 7.04.