AnimeSuki Forums

Register Forum Rules FAQ Members List Social Groups Search Today's Posts Mark Forums Read

Go Back   AnimeSuki Forum > AnimeSuki & Technology > Tech Support

Notices

Reply
 
Thread Tools
Old 2007-04-30, 05:59   Link #1
WanderingKnight
Gregory House
*IT Support
 
 
Join Date: Jun 2006
Location: Buenos Aires, Argentina
Age: 25
Send a message via MSN to WanderingKnight
Stupid Linux question

Alright, I'll post the stupid question of the day, regarding Linux (more specifically, Ubuntu 7.04):

I can get my system to recognize my USB X-MICRO MP3 player. On the file browser, I go to "Computer", and can see the name right there. I try to access it, and nothing happens. I know it may have to do with accessing permissions or something like that. But anyways, since I'm going out to work right now, I'd like to check first. Is there anything I'm doing wrong?

PS: Note that I've just tried mounting it as the root user and I get nothing. It doesn't mount, just stays there unmounted.
__________________


Place them in a box until a quieter time | Lights down, you up and die.

Last edited by WanderingKnight; 2007-04-30 at 06:09.
WanderingKnight is offline   Reply With Quote
Old 2007-04-30, 07:20   Link #2
Jinto
Asuki-tan Kairin ↓
 
 
Join Date: Feb 2004
Location: Fürth (GER)
Age: 33
Let me think USB devices often have the device handle sdX1 where X is a letter (e.g. sda1 or sdb1). In the /dev directory you can look for such devices. If you found one, create a folder somewhere (e.g. /home/user/USB-drive) and use the mount command like this: mount /dev/sdX1 /home/user/USB-drive
If other drives (e.g. SATA) are assigned with sdX1... the USB device most propably is the one with the highest letter (in the alphabet).

When you have the kernel modules for USB mass storage devices, it should mount that thing... if mount complains because of wrong filesystem or the like, either the device was chosen wrong or the media is not supported (missing kernel modules).

Later I will look up how the fstab entry must be set to allow this device to be plugged and unplugged correctly (hope you can do something with the mount command until then)
Jinto is offline   Reply With Quote
Old 2007-04-30, 10:34   Link #3
SeijiSensei
AS Oji-kun
 
 
Join Date: Nov 2006
Location: Mucking about
Age: 64
First, check and see if the device is registered on the USB bus. The easiest way to do this is via the command:

$ grep Product /proc/bus/usb/devices

With my Cowon A2 plugged in, I get this list:
S: Product=EHCI Host Controller
S: Product=USB-PS/2 Optical Mouse
S: Product=COWON A2 Portable Multimedia Player
S: Product=UHCI Host Controller
S: Product=UHCI Host Controller
S: Product=UHCI Host Controller

(Everything you could ever want to know about your computer and the processes running on it is stored somewhere in /proc as plain-text files. )

With the Cowon attached I can see a /proc/scsi/usb-storage directory, and with command 'cat /proc/scsi/usb-storage/1' I see:
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Host scsi1: usb-storage
Vendor: COWON SYSTEMS, Inc.
Product: COWON A2 Portable Multimedia Player
Serial Number: 00000000
Protocol: Transparent SCSI
Transport: Bulk
Quirks:

Next the command 'cat /proc/scsi/scsi' returns:
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: TOSHIBA Model: MK3006GAL Rev: 0000
Type: Direct-Access ANSI SCSI revision: 02

This is the Toshiba-built harddrive in the Cowon. Like most non-IDE devices it looks like a SCSI device. Most mass-storage interfaces in Linux appear to be SCSI devices because it's been easy to extend the SCSI interface to cover other things like USB drives. As Jinto observes, SATA devices also appear to be SCSI.

So on my machine, where I have no SATA drives, the Cowon is assigned the filename /dev/sda1, which is partition 1 of the primary "SCSI" drive /dev/sda. Your machine with SATA drives will have them assigned to /dev/sda, /dev/sdb, etc., with the media player's drive assigned to the next-highest letter. If you have two SATA drives, chances are good the media player would be /dev/sdc1. You could then, as root, mount the media player with 'mount /dev/sdc1 /some/mount/point'. If it has a FAT32 filesystem, as most such devices do, Linux should detect the file format automatically; if not, try using 'mount -t vfat /dev...' instead.

Still I don't understand why your device doesn't just appear on-screen when you plug it in. On my Fedora+KDE system, attaching a USB-storage device results in a window opening on my screen asking me what I want to do with it. In KDE, you can assign different actions to different devices. I open my Canon camera with an image viewing application, but I open the Cowon with KDE's file/web browser Konqueror. I don't have any entry in /etc/fstab for removable storage devices like the Cowon. It all happens automagically when the USB bus detects a new device, the same as it does in Windows. Some of this happens at the kernel level (detecting the device), some of it happens in userland (displaying the alternatives window), and some of it happens at the root user level (mounting the device itself). I have much less experience with GNOME, the default Ubuntu, and Fedora, desktop, though I was pretty sure this type of automounting worked there as well.

If you haven't invested much in this installation, but you're generally happy with Ubuntu, you might want to give Kubuntu a try.
__________________

Last edited by SeijiSensei; 2007-04-30 at 22:23. Reason: Took the wrong bus. Changed "PCI" to "USB"
SeijiSensei is offline   Reply With Quote
Old 2007-04-30, 21:18   Link #4
WanderingKnight
Gregory House
*IT Support
 
 
Join Date: Jun 2006
Location: Buenos Aires, Argentina
Age: 25
Send a message via MSN to WanderingKnight
Okay, I did everything and it works. One last question: All folders appear as locked on regular user mode. It's completely mandatory to enter as root to edit them? (or resort to sudo commands?).

Quote:
If you haven't invested much in this installation, but you're generally happy with Ubuntu, you might want to give Kubuntu a try.
Yeah, I was thinking about it, since I seemed to be able to adapt myself to Linux pretty quickly, at least as far as my regular activities with the PC are concerned (it only took me a day and a half, approximately . Who the hell says Linux is a pain in the ass to learn?). In fact, some of them adapted faster and better to Linux than to Windows (for example, I can run HD h264 files perfectly without the need of fiddling around too much with the codecs and/or players). Since I don't see any use for my XP installation anymore, I was thinking of dumping it altogether and getting another Linux distro on, for example, Kubuntu, to see which one I liked better. I'm supposing there are no problems at all as far as dual booting Linux distros goes.

Besides, I heard all kinds of awful stuff about GNOME, so it'd be cool to see where does KDE improve things.
__________________


Place them in a box until a quieter time | Lights down, you up and die.
WanderingKnight is offline   Reply With Quote
Old 2007-04-30, 21:26   Link #5
Jinto
Asuki-tan Kairin ↓
 
 
Join Date: Feb 2004
Location: Fürth (GER)
Age: 33
Usually except for the folders in /home/your-user-name all other folders are root only (for safety reasons).
Jinto is offline   Reply With Quote
Old 2007-04-30, 21:28   Link #6
WanderingKnight
Gregory House
*IT Support
 
 
Join Date: Jun 2006
Location: Buenos Aires, Argentina
Age: 25
Send a message via MSN to WanderingKnight
Quote:
Usually except for the folders in /home/your-user-name all other folders are root only (for safety reasons).
Well, the folder where I mounted the device was /home/my-user-name/USB, so...
__________________


Place them in a box until a quieter time | Lights down, you up and die.
WanderingKnight is offline   Reply With Quote
Old 2007-04-30, 21:33   Link #7
Jinto
Asuki-tan Kairin ↓
 
 
Join Date: Feb 2004
Location: Fürth (GER)
Age: 33
Did you create the folder with su or sudo command? Maybe its better to create that folder as standard user (I don't have (K)Ubuntu here, I use Gentoo and it works perfectly fine as standard user)
Jinto is offline   Reply With Quote
Old 2007-04-30, 21:40   Link #8
Ledgem
Love Yourself
 
 
Join Date: Mar 2003
Location: Northeast USA
Age: 28
Quote:
Originally Posted by WanderingKnight View Post
Besides, I heard all kinds of awful stuff about GNOME, so it'd be cool to see where does KDE improve things.
I'm really impressed by how quickly you've made Linux your own; it's still taking me a very long time. I threw Kubuntu on my MacBook under virtualization to get accustomed to it, but Mac OS just feels like such an easy transition from Windows. Baby steps!

If you want to try KDE, you can still intall KDE over Ubuntu without going to Kubuntu. I did that when I tried Ubuntu two years ago... do they not allow it anymore? It just made some of the menus a bit cluttered up, because the GNOME side saw KDE's programs added in, and KDE was also seeing GNOME's stuff. I hear both sides can now use each other's software, though, so it might not be a bad thing if you've found some GNOME stuff that you like.
__________________
Ledgem is offline   Reply With Quote
Old 2007-04-30, 21:52   Link #9
WanderingKnight
Gregory House
*IT Support
 
 
Join Date: Jun 2006
Location: Buenos Aires, Argentina
Age: 25
Send a message via MSN to WanderingKnight
Quote:
I hear both sides can now use each other's software, though, so it might not be a bad thing if you've found some GNOME stuff that you like.
Well, at least with the only KDE program I installed (I can't remember its name, it's a media program) ran clunkyly and graphics were pretty messed up. I'm not sure, but I think mp3 support was also off (even though I installed the restricted Ubuntu codecs). Once I installed the GNOME version of it, though (which carries another name, exaile, and thus the reason why I didn't try it in the first place), everything went smooth. Though I liked the KDE graphics better.

And, strangely, I seem to run into a higher quantity of KDE premade packages than GNOME ones... so I'm guessing a switch is on the verge of occurring.

Quote:
Did you create the folder with su or sudo command? Maybe its better to create that folder as standard user (I don't have (K)Ubuntu here, I use Gentoo and it works perfectly fine as standard user)
It might sound stupid, but it seems like the folder unlocked itself when I wasn't looking... O_o. When I open it now, it doesn't show itself as locked anymore and I can delete away anything I want.

And yeah, I created it with sudo...
__________________


Place them in a box until a quieter time | Lights down, you up and die.
WanderingKnight is offline   Reply With Quote
Old 2007-04-30, 22:40   Link #10
SeijiSensei
AS Oji-kun
 
 
Join Date: Nov 2006
Location: Mucking about
Age: 64
Again I don't know how GNOME handles this, but when I attach my Cowon it's mounted as /media/COWON. /media is an empty directory owned by root. I'm pretty certain root creates the mount point on the fly when the device is attached then grants read/write privileges on the mounted filesystem to ordinary users.

One other thing.... I don't know how the Ubuntu installer handles SELinux ("security enhanced Linux"), or whether it's even part of the standard Ubuntu builds, but I turn it off when offered the opportunity in the Fedora installer. I don't really need those enhancements on my desktop workstation which is safely hidden behind a firewall. If someone breaks into the firewall (hasn't happened yet in about a decade, but you never know), then my whole network is breached anyway. Sometimes what might appear to be a permissions problem is really some process running afoul of the SELInux rules. On RedHat-flavored distros like Fedora the setting to turn off SELinux is in /etc/sysconfig/selinux. Changing the SELinux settings is one of the few instances where making a configuration change requires a reboot.
__________________
SeijiSensei is offline   Reply With Quote
Old 2007-04-30, 23:06   Link #11
WanderingKnight
Gregory House
*IT Support
 
 
Join Date: Jun 2006
Location: Buenos Aires, Argentina
Age: 25
Send a message via MSN to WanderingKnight
OK, I'll move on with the stupid questions since that's what the thread is here for...

How exactly indispensable is a firewall using Linux? AFAIK, there aren't supposed to exist widespread viruses or trojans for Linux, so the only risk I can think of is a direct attack... Is that common among Linux users?
__________________


Place them in a box until a quieter time | Lights down, you up and die.
WanderingKnight is offline   Reply With Quote
Old 2007-05-01, 00:05   Link #12
SeijiSensei
AS Oji-kun
 
 
Join Date: Nov 2006
Location: Mucking about
Age: 64
Any computer that is directly exposed to the Internet without any sort of firewalling is just a target waiting to be exploited. The problem isn't just viruses or trojans, it's exploits of well-known, publicly-visible services. In the Linux world, most of these efforts are aimed at server programs ("daemons" in Unix-speak) that listen on specific ports. All the major Unix server programs have been successfully compromised at one time or another -- ssh, http, telnet, smtp, DNS, etc., etc. Of course, there are also a number of exploits for Windows servers. Just the other day I came across a bank phishing site hiding in a subdirectory in the web tree of a French company; the server was running Windows and Microsoft's web server software.

I run servers and am extremely careful which services I open to the public and which software I use to provide those services. For services where exploits are very dangerous, ssh for instance, I usually limit access to the ssh "port" to a specific set of IP addresses. That way I can manage my servers remotely, but the port remains closed to everyone else.

A quick count shows that my home firewall (on a cable connection) has blocked about 350,000 connection attempts since January. My public web server has recorded over 1,300 malicious connection attempts in just the past two days.*

The Internet is not a safe place for unprotected computers of any variety. Do yourself and the rest of us a favor and use a firewall. The default software firewalls that most Linux distros include work fine for computers used for normal activities like web browsing and email. If you intend to offer other services, like a web server, you'll need to learn a bit about writing iptables rules. The simpler alternative is to buy a commercial firewall router. There's a good recent thread about routers in this forum as well.


* I'm not certain whether all the home blockings are really intrusion attempts since many of them are targeted at unusual port numbers in the 40000+ range. The ones on my web server are generally aimed at the usual array of server vulnerabilities, especially Windows server vulnerabilities. I suspect there might be something about the fact that my torrents go through my home firewall that accounts for this high rate of blocking, but I haven't invested the time it would take to find out. Security researchers worry about possible exploitation of BT as its use has grown. By design, BitTorrent opens your computer to remote connections on the BT port you've chosen and advertised on the trackers. If your BT client were discovered to have a vulnerability, the potential exists for it to be exploited remotely. That's one reason I use Azureus since it's open-source, making any potential vulnerabilities more exposed and thus more likely to be fixed. Also exploiting Azureus would only get you into the Java Runtime Environment which is another layer removed from the operating system kernel itself. It seems to me that BT is ripe for exploitation, since the identities of the BT hosts and their open ports can be obtained from the trackers. Rather than polling millions of IP addresses in an effort to find exploitable computers, you can just ask the trackers. Then you just poll the addresses the tracker returns to see which client each one is running. If you see one with a client for which you have an exploit, you're good to go.
__________________
SeijiSensei is offline   Reply With Quote
Old 2007-05-01, 00:27   Link #13
WanderingKnight
Gregory House
*IT Support
 
 
Join Date: Jun 2006
Location: Buenos Aires, Argentina
Age: 25
Send a message via MSN to WanderingKnight
Okay, okay, learned my lesson, got Firestarter working (how good is this firewall?) and with no problems I allowed the port Azureus uses...
__________________


Place them in a box until a quieter time | Lights down, you up and die.
WanderingKnight is offline   Reply With Quote
Old 2007-05-01, 00:41   Link #14
Ledgem
Love Yourself
 
 
Join Date: Mar 2003
Location: Northeast USA
Age: 28
Firestarter was what I used with Linux two years ago (and what I'm going to put up on Kubuntu, once I get it to recognize weird resolutions). In SUSE, the OS' own firewall seems to do a relatively nice job. It doesn't feel as comprehensive as the Windows 3rd-party firewalls, though - it seems like there are less options, and you're definitely not prompted by security questions every five minutes.

It's been said here a few times, but the system firewall is supposed to be -the- last line of defense. If you've a router, you're doing a good job, and don't need to worry about a firewall as much. (But we Windows folks who migrated because we knew better are still paranoid, right?)

My Kubuntu install is now more or less running smoothly, so I can mirror things for you and try to help you along. I'm not using it as my primary OS, though.
__________________
Ledgem is offline   Reply With Quote
Old 2007-05-01, 04:26   Link #15
Jinto
Asuki-tan Kairin ↓
 
 
Join Date: Feb 2004
Location: Fürth (GER)
Age: 33
The way SeijiSensei described the mounting process, is the fstab way.

You know the name of the device handle used right WanderingKnight?

Okay so here is an example for an fstab entry:

First you need to create the folder /mnt/name-of-usb-device with sudo...
Then add such a line to /etc/fstab

/dev/sda1 /mnt/name-of-usb-device auto defaults,user,noauto 0 0

As you can see, it is set to noauto mounting that means you still have to mount and umount it. But this time you can do it without using sudo. Just using mount /mnt/name-of-usb-device. And before you plug out the device use umount /mnt/name-of-usb-device.
Why is it important to u(n)mount the device? The problem is... if you do not umount the device before you unplug it... and shortly after replug it, chances are very high, that the device handle is now one letter higher in the alphabet (thus requiring to mount it the sudo way again)
Jinto is offline   Reply With Quote
Old 2007-05-01, 08:50   Link #16
WanderingKnight
Gregory House
*IT Support
 
 
Join Date: Jun 2006
Location: Buenos Aires, Argentina
Age: 25
Send a message via MSN to WanderingKnight
Quote:
Why is it important to u(n)mount the device? The problem is... if you do not umount the device before you unplug it... and shortly after replug it, chances are very high, that the device handle is now one letter higher in the alphabet (thus requiring to mount it the sudo way again)
Haha, funnily enough, I didn't do so. Guess I'll need to remount it again :O

Quote:
I'm really impressed by how quickly you've made Linux your own; it's still taking me a very long time. I threw Kubuntu on my MacBook under virtualization to get accustomed to it, but Mac OS just feels like such an easy transition from Windows. Baby steps!
Well, about that, one of the reasons for my quick adjustment may be that Windows wasn't my first OS to begin with. Yeah, I my first steps into computing I took them with the old OS 6, using Mac. My dad is a graphical designer and at the time Mac was the best platform with which you could run Photoshop. When I got in touch with Windows, it was necessary that I learned a whole new OS from scratch. I've forgotten many things about Mac OS now, but mainly because I was really short of being a power-user at the time (just imagine, what can a 11-year old kid do with a PC? Options are quite limited), but still, if I needed to use one, I wouldn't have too many problems. So I've always seemed to need to adapt to new OSs, and that's why the transition to Linux was quite fast for me.
__________________


Place them in a box until a quieter time | Lights down, you up and die.

Last edited by WanderingKnight; 2007-05-01 at 09:10.
WanderingKnight is offline   Reply With Quote
Old 2007-05-01, 14:22   Link #17
Ledgem
Love Yourself
 
 
Join Date: Mar 2003
Location: Northeast USA
Age: 28
Quote:
Originally Posted by WanderingKnight View Post
Well, about that, one of the reasons for my quick adjustment may be that Windows wasn't my first OS to begin with. Yeah, I my first steps into computing I took them with the old OS 6, using Mac.
Same for me, actually. I burst onto the Windows scene when Wn95 was new (I can remember arguing with friends over whether Windows 3.1 was better than Windows 95, good times, and it looks like history proved my arguments valid). I'm sure my dad is thrilled that I'm going back to Macs - now I can tech support for him and for my sister, haha.
__________________
Ledgem is offline   Reply With Quote
Old 2007-05-01, 15:48   Link #18
soka
Junior Member
 
 
Join Date: Jan 2006
Location: Argentina
Gnome automounts usb devices through gnome-volume-manager. Make sure you have it running along with hal and dbus. If it's working right you should get an icon on the desktop whenever an usb storage device is connected.
soka is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:17.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
We use Silk.