Results 1 to 8 of 8

Thread: USB and memorycards read-only

  1. #1
    Hatsjiekidee NNTP User

    Default USB and memorycards read-only

    Hi,

    This is my first time here, but I have a problem I can not solve myself. I googled arround for a few days, but whitout result.

    I have recently installed 2 laptops with OpenSuse 11.1. One laptop was brand new, and the other one was running OpenSuse for 6 months whitout problems, but I wanted to do a fresh install anyway.
    On both laptops I have the same issue, when I connect a USB stick, or a memmory card, I can read from it, but I can not write to it.
    I've tried different fstab settings, but nothing seems to help.
    As root, I can write to the disk, but get an error chowning the files.

    This is wat my messages log says when I connect a USB-stick:
    Oct 21 16:23:20 linux-keog kernel: usb 1-3: new high speed USB device using ehci_hcd and address 9
    Oct 21 16:23:20 linux-keog kernel: usb 1-3: configuration #1 chosen from 1 choice
    Oct 21 16:23:20 linux-keog kernel: scsi10 : SCSI emulation for USB Mass Storage devices
    Oct 21 16:23:20 linux-keog kernel: usb 1-3: New USB device found, idVendor=17ef, idProduct=3832
    Oct 21 16:23:20 linux-keog kernel: usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    Oct 21 16:23:20 linux-keog kernel: usb 1-3: Product: Memory Key 4GB
    Oct 21 16:23:20 linux-keog kernel: usb 1-3: Manufacturer: Lenovo
    Oct 21 16:23:20 linux-keog kernel: usb 1-3: SerialNumber: c82420f6aef0b1
    Oct 21 16:23:20 linux-keog kernel: usb-storage: device found at 9
    Oct 21 16:23:20 linux-keog kernel: usb-storage: waiting for device to settle before scanning
    Oct 21 16:23:21 linux-keog kernel: scsi 10:0:0:0: Direct-Access Lenovo Memory Key 4GB 1010 PQ: 0 ANSI: 2
    Oct 21 16:23:21 linux-keog kernel: sd 10:0:0:0: [sdb] 8060927 512-byte hardware sectors: (4.12 GB/3.84 GiB)
    Oct 21 16:23:21 linux-keog kernel: sd 10:0:0:0: [sdb] Write Protect is off
    Oct 21 16:23:21 linux-keog kernel: sd 10:0:0:0: [sdb] Mode Sense: 00 00 00 00
    Oct 21 16:23:21 linux-keog kernel: sd 10:0:0:0: [sdb] Assuming drive cache: write through
    Oct 21 16:23:21 linux-keog kernel: sd 10:0:0:0: [sdb] 8060927 512-byte hardware sectors: (4.12 GB/3.84 GiB)
    Oct 21 16:23:21 linux-keog kernel: sd 10:0:0:0: [sdb] Write Protect is off
    Oct 21 16:23:21 linux-keog kernel: sd 10:0:0:0: [sdb] Mode Sense: 00 00 00 00
    Oct 21 16:23:21 linux-keog kernel: sd 10:0:0:0: [sdb] Assuming drive cache: write through
    Oct 21 16:23:22 linux-keog kernel: sdb: sdb1
    Oct 21 16:23:22 linux-keog kernel: sd 10:0:0:0: [sdb] Attached SCSI removable disk
    Oct 21 16:23:22 linux-keog kernel: sd 10:0:0:0: Attached scsi generic sg2 type 0
    Oct 21 16:23:22 linux-keog kernel: usb-storage: device scan complete
    Oct 21 16:23:22 linux-keog hald: mounted /dev/sdb1 on behalf of uid 1000
    And this is my fstab file:

    /dev/disk/by-id/ata-FUJITSU_MHW2160BH_PL_K10FT7925CY3-part5 swap swap defaults 0 0
    /dev/disk/by-id/ata-FUJITSU_MHW2160BH_PL_K10FT7925CY3-part6 / ext3 acl,user_xattr 1 1
    /dev/disk/by-id/ata-FUJITSU_MHW2160BH_PL_K10FT7925CY3-part7 /home ext3 acl,user_xattr 1 2
    proc /proc proc defaults 0 0
    sysfs /sys sysfs noauto 0 0
    debugfs /sys/kernel/debug debugfs noauto 0 0
    devpts /dev/pts devpts mode=0620,gid=5 0 0
    usbfs /proc/bus/usb usbfs noauto 0 0
    Ideas anyone?

    Thnx.
    Ed.

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,766

    Default Re: USB and memorycards read-only

    To begin with these devices are not mounted usinng /etc/fstab. Would be impossible because there are no entries there for them. As a consequence I do not understand what you did in "I've tried different fstab settings, but nothing seems to help."
    They are mounted by HAL on behalf of your DE. And HAL mounts them somewhere in /media/ as you may have seen. You could check the ownership and access-bits inside /media to see if you are the owner or not and have write access or not (HAL says it mounted for user 1000, I suppose this is your uid).

    About the changing of ownership on the devices themselves. I suppose (you did not say so) that they are NTFS or some other MS filesystem. These filesystems do not have owner/group/access-bits, so changing is not applicable.
    Henk van Velden

  3. #3
    Hatsjiekidee NNTP User

    Default Re: USB and memorycards read-only

    Quote Originally Posted by hcvv View Post
    To begin with these devices are not mounted usinng /etc/fstab.
    As a consequence I do not understand what you did in "I've tried different fstab settings,
    I realized this today. Therefore my changes to the fstab file didn't work.

    Quote Originally Posted by hcvv View Post
    You could check the ownership and access-bits inside /media to see if you are the owner or not and have write access or not (HAL says it mounted for user 1000, I suppose this is your uid).
    The 1000 is from my user-id. I've checked the ownership inside /media when a device is mounted (disk in this case).

    drwxr-xr-x 12 root root 32768 1970-01-01 01:00 disk

    Files in the disk dir have the following flags:

    -rwxr-xr-x 1 root root 162 2009-10-15 21:09 device.nng

    So I suppose that while it states in the messagses log that the device is mounted for user 1000 (me) in realtiy it is mounted for root.

    Could it be that the user has to be a member of a specific group?

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,766

    Default Re: USB and memorycards read-only

    Hm, I put memory thingy in and have:
    Code:
    drwxr-xr-x  6 henk root 16384 Jan  1  1970 DISK_IMG/
    of which I have no doubt that you consider this correct.

    This is on 10.3, but with so many people working with 11.1 I think it must work OK for them.

    Your suggestion about being member of a group. That would then be group root (in both cases) and stil be r-x. There was some temporary solution in 11.0 to add group disk to the user for CD problems, but that is long ago.

    When you remove the device correctly (save removal), is the directory /media/disk then gone? Maybe it kept hanging after a incorrect removal. When testing this, also remove both .hal-* files from /media. HAL willl create them anew when needed. Can you test this?
    Henk van Velden

  5. #5
    Hatsjiekidee NNTP User

    Default Re: USB and memorycards read-only

    Hi Henk,

    I've checked /media/disk and it is gone when the usb stick is removed. I've removed the HAL files, but this did not help.

    The strange thing is that it did work on this laptop before. On Suse 11.1.

    I've added the user to the disk group, just in case, but that didn't work either.

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,766

    Default Re: USB and memorycards read-only

    Do not forget to remove the disk group from the user after the test because it is a security risk (not for a short test, but in general).

    And that it works in most systems on 11.1 we argued earlier. We ae still trying to find out why your systems are an exception.

    To recap for those who just jump halfway into this thread, in dmesg we find
    Code:
    Oct 21 16:23:22 linux-keog hald: mounted /dev/sdb1 on behalf of uid 1000
    but
    Code:
    drwxr-xr-x 12 root root 32768 1970-01-01 01:00 disk
    You did not change by any means something in the Policykit files?
    Henk van Velden

  7. #7
    Hatsjiekidee NNTP User

    Default Re: USB and memorycards read-only

    I've found the solution !!

    After reading this website I found that HAl was not the problem. Gnome-mount has to take care of the rights issue, and did not do that correctly.

    Yhen I stumbled onto this forum thread.
    It was a mount scheme problem. After correcting the vfat mount scheme as suggested in the thread, all is well again. On both laptops all USB devices are accessable to the user again.

    Thanx for thinking along with me, and your help.

    Regards,

    Ed.

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,766

    Default Re: USB and memorycards read-only

    You are welcome. Nice you found it. In any case none of us mentioned Gnome. I am on KDE which I also did not mention.
    Henk van Velden

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •