Re: USB stick with ext2?

2009-01-06 Thread Alan Evans
On Mon, Jan 5, 2009 at 10:18 PM, Ed Greshko  wrote:
> With the USB mounted become root  Then "chown alan /media/disk".
> The ownership information is maintained in the ext2 structure.  So, the
> next time it is mounted it will retain ownership by alan.

I find this acceptable. At least my source code files aren't
executable, as they pretend to be with vfat.

A better system for removable media would be for the root folder owner
be changed to that of the console user, as it appears to happen with
vfat mounts. That way, the media could be truly portable with minimum
fuss.

Actually, that leads me to my solution! Just do chmod 777 on the thumb
drive's root folder and it all behaves the way I want. Anybody can
create files or folders on the device, and read/write permissions are
sensibly handled.

Thanks for all the input, guys!

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: USB stick with ext2?

2009-01-06 Thread Mikkel L. Ellertson
Ed Greshko wrote:
> Alan Evans wrote:
>> Howdy!
>>
>> When I insert a USB thumb drive formatted with vfat, it gets
>> automagically mounted under /media with appropriate permissions so the
>> logged in user can write to the device. But if the thumb drive is
>> formatted ext2, only root can write to it.
>>
>> $ mount
>> /dev/sdb1 on /media/Devel type ext2 (rw,nosuid,nodev,uhelper=hal)
>> /dev/sdc1 on /media/disk type vfat
>> (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=500)
>> $ ll
>> total 20
>> drwxr-xr-x 3 root root  4096 2009-01-05 21:27 Devel
>> drwxr-xr-x 3 alan root 16384 1969-12-31 16:00 disk
>>
>> Is there a way to make that work?
>>
>>
>>   
> With the USB mounted become root  Then "chown alan /media/disk". 
> The ownership information is maintained in the ext2 structure.  So, the
> next time it is mounted it will retain ownership by alan.
> 
One thing to keep in mind if you do this - if you move the drive to
another machine where the UID and GID for alan are different, you
will not be able to access the drive as alan. The owner/group
settings are the number, not the name, of the user/group.

You may want to use chown alan:alan /media/Devel instead of chown
alan /media/disk. This will set both the owner and group of the
disk. In this case, I would not use the -R option - I do not know
what the affect of changing the ownership of /media/Devel/lost+found
would be.

You also have the option of creating a directory on the USB drive
owned by alan. That way, you could have storage for more then one
user on the drive.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!



signature.asc
Description: OpenPGP digital signature
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Re: USB stick with ext2?

2009-01-06 Thread Michael Cronenworth

 Original Message 
Subject: Re: USB stick with ext2?
From: Bryn M. Reeves 
To: Community assistance, encouragement, and advice for using Fedora. 


Date: 01/06/2009 06:12 AM



No - ext2/3/4's root inodes are just regular directories and can be 
owned by any user as Ed already mentioned. I set most of my removable 
media to be owned by my normal UID/GID for exactly this reason (they can 
also be labelled with xattrs for e.g. SELinux if required).




That's what happens when there's 50 different filesystems. I guess I 
need to brush up on my man mount knowledge.


I don't use ext2/3/4 for any drive or media I own nor at work.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: USB stick with ext2?

2009-01-06 Thread Bryn M. Reeves

Michael Cronenworth wrote:

Alan Evans wrote:

Is there a way to make that work


Yes. Make a directory on the stick with your user permissions. The "/" 
of the usb drive will always be owned by root through HAL/dbus/gvfs


No - ext2/3/4's root inodes are just regular directories and can be 
owned by any user as Ed already mentioned. I set most of my removable 
media to be owned by my normal UID/GID for exactly this reason (they can 
also be labelled with xattrs for e.g. SELinux if required).


AFAIK. You could setup a special fstab line for manual mounting without 
requiring a folder, but I don't know if there is such an option in the DE.


AFAIK, you still can't do that with ext2/3/4 - they do not support a 
uid=/gid= mount option like vfat that would allow you to change 
ownership of the entire file system at mount time.


Regards,
Bryn.


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: USB stick with ext2?

2009-01-05 Thread Ed Greshko
Alan Evans wrote:
> Howdy!
>
> When I insert a USB thumb drive formatted with vfat, it gets
> automagically mounted under /media with appropriate permissions so the
> logged in user can write to the device. But if the thumb drive is
> formatted ext2, only root can write to it.
>
> $ mount
> /dev/sdb1 on /media/Devel type ext2 (rw,nosuid,nodev,uhelper=hal)
> /dev/sdc1 on /media/disk type vfat
> (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=500)
> $ ll
> total 20
> drwxr-xr-x 3 root root  4096 2009-01-05 21:27 Devel
> drwxr-xr-x 3 alan root 16384 1969-12-31 16:00 disk
>
> Is there a way to make that work?
>
>
>   
With the USB mounted become root  Then "chown alan /media/disk". 
The ownership information is maintained in the ext2 structure.  So, the
next time it is mounted it will retain ownership by alan.


-- 
Not SENSUOUS ... only "FROLICSOME" ... and in need of DENTAL WORK ... in
PAIN!!! mei-mei.gres...@greshko.com
http://tw.youtube.com/watch?v=cCSz_koUhSg



signature.asc
Description: OpenPGP digital signature
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Re: USB stick with ext2?

2009-01-05 Thread Michael Cronenworth

Alan Evans wrote:

Is there a way to make that work


Yes. Make a directory on the stick with your user permissions. The "/" 
of the usb drive will always be owned by root through HAL/dbus/gvfs 
AFAIK. You could setup a special fstab line for manual mounting without 
requiring a folder, but I don't know if there is such an option in the DE.


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: USB stick

2008-08-20 Thread Xavier Mas
El Wednesday 20 August 2008 00:04:55 Patrick O'Callaghan va escriure:
> On Tue, 2008-08-19 at 23:04 +0200, Xavier Mas wrote:
> > El Tuesday 19 August 2008 22:45:21 Joonas Sarajärvi va escriure:
> > > 2008/8/19 Xavier Mas <[EMAIL PROTECTED]>:
> >
> > [...]>
> >
> > > Could you post the output of dmesg after plugging in the USB stick?
> > > Someone else may also have some other useful debugging commands for
> > > this.
> > >
> > > --
> > > Joonas Sarajärvi
> > > [EMAIL PROTECTED]
> >
> > how can I to get this output?
>
> Plug in the stick, wait a few seconds for the driver to settle, then
> type "dmesg" at any console or terminal window. Look for a line similar
> to "usb 1-1: new high speed USB device using ehci_hcd and address 2" and
> copy from there to the end.
>
> poc

Patrick,

this are the lines of dmesg for all usb devices (I think the good ones are the 
USB Mass Storage). 

Thank you very much for your help.

-- 
Xavier Mas
ehci_hcd :00:1d.7: EHCI Host Controller
ehci_hcd :00:1d.7: new USB bus registered, assigned bus number 1
ehci_hcd :00:1d.7: debug port 1
PCI: cache line size of 128 is not supported by device :00:1d.7
ehci_hcd :00:1d.7: irq 23, io mem 0xff27fc00
ehci_hcd :00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 8 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.25.14-69.fc8 ehci_hcd
usb usb1: SerialNumber: :00:1d.7
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
USB Universal Host Controller Interface driver v3.0
PCI Interrupt :00:1d.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device :00:1d.0 to 64
uhci_hcd :00:1d.0: UHCI Host Controller
uhci_hcd :00:1d.0: new USB bus registered, assigned bus number 2
uhci_hcd :00:1d.0: irq 16, io base 0xe000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: UHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.25.14-69.fc8 uhci_hcd
usb usb2: SerialNumber: :00:1d.0
ACPI: PCI Interrupt :00:1d.1[B] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device :00:1d.1 to 64
uhci_hcd :00:1d.1: UHCI Host Controller
uhci_hcd :00:1d.1: new USB bus registered, assigned bus number 3
uhci_hcd :00:1d.1: irq 19, io base 0xe400
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
hub 1-0:1.0: unable to enumerate USB device on port 1
usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: UHCI Host Controller
usb usb3: Manufacturer: Linux 2.6.25.14-69.fc8 uhci_hcd
usb usb3: SerialNumber: :00:1d.1
ACPI: PCI Interrupt :00:1d.2[C] -> GSI 18 (level, low) -> IRQ 18
PCI: Setting latency timer of device :00:1d.2 to 64
uhci_hcd :00:1d.2: UHCI Host Controller
uhci_hcd :00:1d.2: new USB bus registered, assigned bus number 4
uhci_hcd :00:1d.2: irq 18, io base 0xe800
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb4: Product: UHCI Host Controller
usb usb4: Manufacturer: Linux 2.6.25.14-69.fc8 uhci_hcd
usb usb4: SerialNumber: :00:1d.2
ACPI: PCI Interrupt :00:1d.3[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device :00:1d.3 to 64
uhci_hcd :00:1d.3: UHCI Host Controller
uhci_hcd :00:1d.3: new USB bus registered, assigned bus number 5
uhci_hcd :00:1d.3: irq 16, io base 0xec00
usb usb5: configuration #1 chosen from 1 choice
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
usb 2-1: new low speed USB device using uhci_hcd and address 2
usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb5: Product: UHCI Host Controller
usb usb5: Manufacturer: Linux 2.6.25.14-69.fc8 uhci_hcd
usb usb5: SerialNumber: :00:1d.3
input,hidraw0: USB HID v1.00 Mouse [HID 04b4:0033] on usb-:00:1d.0-1
usb 2-1: New USB device found, idVendor=04b4, idProduct=0033
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb 1-7: new high speed USB device using ehci_hcd and address 3
usb 1-7: configuration #1 chosen from 1 choice
scsi2 : SCSI emulation for USB Mass Storage devices
usb 1-

Re: USB stick

2008-08-19 Thread Patrick O'Callaghan
On Tue, 2008-08-19 at 23:04 +0200, Xavier Mas wrote:
> El Tuesday 19 August 2008 22:45:21 Joonas Sarajärvi va escriure:
> > 2008/8/19 Xavier Mas <[EMAIL PROTECTED]>:
> [...]>
> > Could you post the output of dmesg after plugging in the USB stick?
> > Someone else may also have some other useful debugging commands for
> > this.
> >
> > --
> > Joonas Sarajärvi
> > [EMAIL PROTECTED]
> 
> how can I to get this output?

Plug in the stick, wait a few seconds for the driver to settle, then
type "dmesg" at any console or terminal window. Look for a line similar
to "usb 1-1: new high speed USB device using ehci_hcd and address 2" and
copy from there to the end.

poc

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list


Re: USB stick

2008-08-19 Thread Xavier Mas
El Tuesday 19 August 2008 22:45:21 Joonas Sarajärvi va escriure:
> 2008/8/19 Xavier Mas <[EMAIL PROTECTED]>:
> > Hi list,
> >
> > I recently installed Fedora 8 in my computer and when starts I'm getting
> > a message that says: hub 1-0: unable to enumerate USB device on port 1.
>
> My Fedora installations on my main desktop computer have always done
> this since at least Fedora Core 6, depending a bit on which devices I
> have connected. I don't have any USB related problems, though, so I'd
> guess it is just a minor warning, and probably not the source of your
> usb media problems.
>
> > Then, when desktop is fully up I can't mount the USB stick (doesn't mount
> > automatically when I insert it into the port).
> >
> > Seems a bad installation or maybe a bug. Any suggestions?
>
> Could you post the output of dmesg after plugging in the USB stick?
> Someone else may also have some other useful debugging commands for
> this.
>
> --
> Joonas Sarajärvi
> [EMAIL PROTECTED]

how can I to get this output?

-- 
Xavier Mas

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list


Re: USB stick

2008-08-19 Thread Joonas Sarajärvi
2008/8/19 Xavier Mas <[EMAIL PROTECTED]>:
> Hi list,
>
> I recently installed Fedora 8 in my computer and when starts I'm getting a
> message that says: hub 1-0: unable to enumerate USB device on port 1.

My Fedora installations on my main desktop computer have always done
this since at least Fedora Core 6, depending a bit on which devices I
have connected. I don't have any USB related problems, though, so I'd
guess it is just a minor warning, and probably not the source of your
usb media problems.

> Then, when desktop is fully up I can't mount the USB stick (doesn't mount
> automatically when I insert it into the port).
>
> Seems a bad installation or maybe a bug. Any suggestions?

Could you post the output of dmesg after plugging in the USB stick?
Someone else may also have some other useful debugging commands for
this.

-- 
Joonas Sarajärvi
[EMAIL PROTECTED]

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list