How to partition/add folders in USB flash drive?

Discussion in 'Linux' started by steppiemum, Aug 27, 2008.

  1. steppiemum

    steppiemum

    Joined:
    Jul 26, 2008
    Messages:
    30
    Likes Received:
    0
    Hello all,

    I sure could use some help. I have an 8 GB flash drive that I bought for the purpose of putting photos on, during my upcoming trip. However, I had to use that drive to download my recovery disc onto. Now, all I see on my Flash drive is "USBINSTALL". It seems that I've lost the ability to have anything else on the drive. When I ask to send a folder to the USBINSTALL, it says "Failed to create directory "/media/USBINSTALL/globe" (Permission denied).

    I would really like to have different folders on the flash drive for each day of my trip. Can someone tell me how to do this? It seems that I should be able to have different folders on this flash drive.

    I'm still trying to find my way around this little machine, and this has got me hung up. Please be kind and precise in any answer because I'm not linux literate at all.

    Thanks!
    Chris
     
    steppiemum, Aug 27, 2008
    #1
  2. steppiemum

    rebuilder

    Joined:
    Aug 20, 2008
    Messages:
    55
    Likes Received:
    0
    OK, there's a number of things we could try, depending on what the problem is. I'm guessing the owner of the directories and files on the disk is set to root. You can verify this by opening a terminal window, and typing:
    Code:
    ls -l /media
    You'll get a directory listing of the flash card, in some detail. You should be getting rows like:
    drwxr-xr-x 3 user root 16384 2008-02-03 17:57 DirName
    and you'll want to find the row with USBINSTALL on it.

    Now, the first character sequence is probably not the issue, but if you're interested, read the following to see what they mean:
    the 'd' means the item is a directory, and the following set of characters lists the permissions for the item in question. the first three letters are the permissions for the 'user' the item is registered to, in this case named 'user', the second three are for the 'group' the item is registered to, in this case named 'root', and the last three are for 'others', that is, users and programs that are not named 'user' and are not members of the group 'root'. a w means write permission is allowed, an x means permission to execute commands and r means read permission. a - in place of any of these means permission is denied.

    Anyhow, what we're looking for here is what user and group the folders are owned by. I'm guessing it'll say 'root root' for your drive. (If it does NOT, then post here and paste the listing, also paste the output of the command 'mount' in terminal.) Depending on the permissions granted to users other than root, as described above, it means only a superuser or root can write to, or possibly even read from the directory. So there are a couple of options now. You can change the permissions for the entire drive, but as I'm not entirely sure how the restore disk works, I'm not sure that's wise. Alternatively, we can create a new directory on the drive and give the normal user ownership of that. Here's how:

    still in terminal, type:
    Code:
    sudo mkdir /media/USBINSTALL/dirname 
    sudo chown user:user /media/USBINSTALL/dirname
    [substitute 'dirname' with whatever name you want to give your directory]

    After this, you should be able to find the directory you created via file manager and write to it. If you don't want to use the disk for recovery any more, then it is of course safe to just change ownership for the whole drive, using the chown command above. It might be safe even if you do, but I'm not sure.
     
    rebuilder, Aug 27, 2008
    #2
  3. steppiemum

    steppiemum

    Joined:
    Jul 26, 2008
    Messages:
    30
    Likes Received:
    0
    Thanks Rebuilder.

    When I typed in the "ls" command, it only brought up USBINSTALL. When I typed in either of the commands that you suggested (ex. sudo chown user:user /media/USBINSTALL/photos) the response was:

    "audit_log_user_command(): Connection refused"

    Have you got another idea? I think I might have to delete the recovery information for my USB flashdrive.

    I will anxiously await your response.
    Chris
     
    steppiemum, Aug 27, 2008
    #3
  4. steppiemum

    rebuilder

    Joined:
    Aug 20, 2008
    Messages:
    55
    Likes Received:
    0
    For some reason the AA1 Linpus gives that error whenever sudo is used. The commands work anyway, you can ignore it. Did you try to write to the directory you created after running the commands?
     
    rebuilder, Aug 28, 2008
    #4
  5. steppiemum

    steppiemum

    Joined:
    Jul 26, 2008
    Messages:
    30
    Likes Received:
    0
    Yes, actually, I didn try writing after the commands. In frustration, I called SanDisk technical to hlep. I wiped the entire flash drive free, as well as the unusable U3 programming thing that was built in to it. Now all is well and I can make folders in my flash drive.

    Thanks so much for trying to help!

    Chris
     
    steppiemum, Aug 28, 2008
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.