Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Unable to write on FAT32 partition as regular user

Hybrid View

  1. #1
    Member registered user
    Join Date
    Oct 2005
    Location
    manchester, uk
    Posts
    35

    Unable to write on FAT32 partition as regular user

    Hi,

    I am currently using Knoppix 5.0.1, HD install, and I am trying to write to my FAT32 partition in order to store some files I want to download with Bittorrent. But when I try to do so, I receive an error message:

    Failed to create directory /media/hda1/directory

    (Do you have the required permissions?

    This is my mount output regarding /media/hda1:

    Code:
    /dev/hda1 on /media/hda1 type vfat (rw)
    where I guess that rw means that it is mounted as read-write, and not read-only.

    I also tried to change the permission both on command line (chmod 777 /media/hda1), and on the properties menu (right-click on the icon), but I got no results. And I also tried to click on "Change read/write mode" on the right-click menu of the hda1 icon on my desktop, getting no results.
    Then I tried to change the group of the folder to users, and this is what I got:

    Code:
    root@scatoletta:/home/mmanu# chgrp users /media/hda1
    chgrp: changing group of `/media/hda1': Operation not permitted
    At the end I tried just to create a folder in /media/hda1 to be sure that my problem was not caused by Bittorrent:

    Code:
    mmanu@scatoletta:/media/hda1$ mkdir new
    mkdir: cannot create directory `new': Permission denied

    At this point I am short of ideas, and I don't understand what is going on.

    Any suggestion?

    Thank you for your time.

  2. #2
    Senior Member registered user
    Join Date
    Sep 2005
    Posts
    205
    You could try this:
    Code:
    sudo mount -o remount,uid=knoppix,gid=knoppix /dev/hda1
    This sets "knoppix" to be the owner of all files in /dev/hda1, and then you should be able to use them without permission errors.

    Quote Originally Posted by finferflu
    root@scatoletta:/home/mmanu# chgrp users /media/hda1
    chgrp: changing group of `/media/hda1': Operation not permitted
    IMHO, FAT32-partitions can't save the owner & group information, so commands like chgrp are probably useless for FAT32 partitions.

    Quote Originally Posted by finferflu
    mmanu@scatoletta:/media/hda1$ mkdir new
    mkdir: cannot create directory `new': Permission denied
    When you get permission-problems, you could also test
    Code:
    sudo mkdir new
    to know if root-user can create a directory there or not.

  3. #3
    Member registered user
    Join Date
    Oct 2005
    Location
    manchester, uk
    Posts
    35
    Ok, I have done as you suggested, but had the same results. I have already checked wheter I could write on hda1as root-user, and there is no problem in doing that.

    To be clear, I did not use the sudo command, but did everything under root, since my user seems not to appear in the sudoers file (and I need to study how to do that), but I don't think that this makes any difference...

  4. #4
    Senior Member registered user
    Join Date
    Sep 2005
    Posts
    205
    Quote Originally Posted by finferflu
    Ok, I have done as you suggested, but had the same results. I have already checked wheter I could write on hda1as root-user, and there is no problem in doing that.

    To be clear, I did not use the sudo command, but did everything under root, since my user seems not to appear in the sudoers file (and I need to study how to do that), but I don't think that this makes any difference...
    Sorry, I didn't realize you are not using user "knoppix".

    So if your username is "mmanu" you need to use
    Code:
    mount -o remount,uid=mmanu /dev/hda1
    If that doesn't work, could you tell
    - What is the output from that command?
    - What is the output from "mount" after that command?

  5. #5
    Member registered user
    Join Date
    Oct 2005
    Location
    manchester, uk
    Posts
    35
    well, I knew I had to write mmanu in the place of knoppix, and so I did.

    this is the output:

    Code:
    root@scatoletta:/media/hda1# mount -o remount,uid=mmanu,gid=mmanu /dev/hda1
    root@scatoletta:/media/hda1#
    (no output)

    and

    Code:
    root@scatoletta:/media/hda1# mount
    /dev/hda2 on / type ext3 (rw,errors=remount-ro)
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    usbfs on /proc/bus/usb type usbfs (rw,devmode=0666)
    tmpfs on /dev/shm type tmpfs (rw)
    devpts on /dev/pts type devpts (rw,gid=5,mode=620)
    automount(pid6264) on /mnt/auto type autofs (rw,fd=4,pgrp=6264,minproto=2,maxproto=4)
    /dev/hda1 on /media/hda1 type vfat (rw,nosuid,nodev,umask=000,shortname=winnt,uid=knoppix,gid=knoppix,uid=1000,gid=1000)
    it seems that it didn't quite accept my command...

  6. #6
    Senior Member registered user
    Join Date
    Sep 2005
    Posts
    205
    Quote Originally Posted by finferflu
    Code:
    /dev/hda1 on /media/hda1 type vfat (rw,nosuid,nodev,umask=000,shortname=winnt,uid=knoppix,gid=knoppix,uid=1000,gid=1000)
    it seems that it didn't quite accept my command...
    That seems strange, as there's two values for uid & gid.

    Unfortunately I don't have space on my HD to create a FAT32-partition for testing, but here is an additional idea:

    Check your numeric uid & gid with
    Code:
    knoppix@2[knoppix]$ id
    uid=1000(knoppix) gid=1000(knoppix) groups=20(dialout),21(fax),22(voice),24(cdrom), .....
    Most likely that will tell uid=1000 gid=1000. Then umount & mount the partition to some other place:
    Code:
    umount /media/hda1
    mkdir /home/mmanu/hda1
    mount -t vfat -o uid=1000,gid=1000 /dev/hda1 /home/mmanu/hda1
    And after that check output from "mount" to see if it has options "uid=1000,gid=1000"

  7. #7
    Member registered user
    Join Date
    Oct 2005
    Location
    manchester, uk
    Posts
    35
    Yes, this time it worked fine.

    And this is my mount output that interests us:

    Code:
    /dev/hda1 on /home/mmanu/hda1 type vfat (rw,uid=1000,gid=1000)
    Now, the last question is, do I have to do this everytime?


    Thanks a lot for your help so far ^__^

  8. #8
    Senior Member registered user
    Join Date
    Sep 2005
    Posts
    205
    Quote Originally Posted by finferflu
    Yes, this time it worked fine.

    And this is my mount output that interests us:

    Code:
    /dev/hda1 on /home/mmanu/hda1 type vfat (rw,uid=1000,gid=1000)
    Now, the last question is, do I have to do this everytime?
    Could you first show the contents of /etc/fstab file. (I'm mainly interested about line(s) where hda1 is mentioned.)
    Code:
    cat /etc/fstab
    Also, is /dev/hda1 currently mounted automatically when computer starts?

  9. #9
    Member registered user
    Join Date
    Oct 2005
    Location
    manchester, uk
    Posts
    35
    Ok, here it is:

    Code:
    mmanu@scatoletta:~$ cat /etc/fstab | grep hda1
    /dev/hda1 /media/hda1 vfat noauto,users,exec,umask=000,shortname=winnt,uid=knoppix,gid=knoppix 0 0
    And, /dev/hda1 is not mounted automatically.

  10. #10
    Senior Member registered user
    Join Date
    Sep 2005
    Posts
    205
    Quote Originally Posted by finferflu
    Ok, here it is:

    Code:
    mmanu@scatoletta:~$ cat /etc/fstab | grep hda1
    /dev/hda1 /media/hda1 vfat noauto,users,exec,umask=000,shortname=winnt,uid=knoppix,gid=knoppix 0 0
    And, /dev/hda1 is not mounted automatically.
    You could first try changing that "uid=knoppix,gid=knoppix" to "uid=1000,gid=1000" and keeping the rest as is.
    Then try
    Code:
    umount /dev/hda1
    mount /dev/hda1
    to see if that works.
    (NOTE: If you give BOTH device AND directory to mount-command, then /etc/fstab is not used. If you only give one of them, then options are read from /etc/fstab)

    Removing "noauto" option just might make it be automatically mounted on startup. If not, then I can't help on that.
    "users" option means that you should be able to mount it as normal user.

Page 1 of 2 12 LastLast

Similar Threads

  1. is it safe to write to a FAT32 partition from knoppix?
    By someuser77 in forum General Support
    Replies: 5
    Last Post: 08-13-2005, 08:01 PM
  2. Replies: 2
    Last Post: 05-22-2005, 11:44 AM
  3. Can't access floppy as regular user
    By Dan in forum Hdd Install / Debian / Apt
    Replies: 3
    Last Post: 02-18-2004, 09:14 PM
  4. How to write files onto FAT32 partition?
    By margaritaville in forum General Support
    Replies: 10
    Last Post: 01-29-2004, 04:09 AM
  5. Unable to access windows partition as user 'knoppix'
    By area in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 06-30-2003, 07:21 AM

Posting Permissions

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


Vintage Apple II Avant-Garde Creations  Super Shape Draw And Animate 1981 picture

Vintage Apple II Avant-Garde Creations Super Shape Draw And Animate 1981

$295.00



Vintage Apple Monitor IIc 9

Vintage Apple Monitor IIc 9" Green Monochrome 06/1985 A2M4090 October 1984 Stand

$275.00



Rare Vintage Macintosh Apple Wooden Disk Storage Box Dovetailed picture

Rare Vintage Macintosh Apple Wooden Disk Storage Box Dovetailed

$69.95



LARGE LOT Vintage Apple Macintosh Mouse Cables Accessories SCSI etc - UNTESTED picture

LARGE LOT Vintage Apple Macintosh Mouse Cables Accessories SCSI etc - UNTESTED

$80.00



Vintage Apple Macintosh 128K 512K Carrying Case Rainbow Logo Excellent Cond picture

Vintage Apple Macintosh 128K 512K Carrying Case Rainbow Logo Excellent Cond

$140.00



5x Vintage Apple Macintosh II NuBus Cards 630-4179 NI GPIB DIO Asante Ethernet picture

5x Vintage Apple Macintosh II NuBus Cards 630-4179 NI GPIB DIO Asante Ethernet

$239.95



Apple PowerBook 3400c TFT LCD RARE Vintage Laptop untested picture

Apple PowerBook 3400c TFT LCD RARE Vintage Laptop untested

$139.99



Vintage Apple Power Mac G4 Cube Poster (2000) 36 x 24 - Think Different picture

Vintage Apple Power Mac G4 Cube Poster (2000) 36 x 24 - Think Different

$29.99



Vintage Apple Multiple Scan 15av Display Monitor M4681 picture

Vintage Apple Multiple Scan 15av Display Monitor M4681

$299.99



Vintage Apple Assembly Line Newsletter Vol: 1,2,3,4,5,6,7 From 1984 picture

Vintage Apple Assembly Line Newsletter Vol: 1,2,3,4,5,6,7 From 1984

$179.99