Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Not able to delete files from Transcend 8gb flash drive

  1. #1
    Join Date
    Nov 2009
    Beans
    21

    Not able to delete files from Transcend 8gb flash drive

    I'm not able to delete files from my Transcend 8 gb flash drive. I'm not able to change permissions of files either.

    I had formatted it into FAT32 filesystem using Gparted. After this I was able to copy files into it, but I am not able to delete anything. I am not even able to delete the partition using Gparted.
    Last edited by ronnie.s; May 19th, 2017 at 07:20 PM.

  2. #2
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!

    Re: Not able to delete files from Transcend 8gb flash drive

    Does it have a small physical Read-only slide or switch?

    With it attached and mounted what does the mount command output?
    DISTRO: Xubuntu 16.04-64bit --- Code-tags --- Boot-Repair --- Grub2 wiki & Grub2 Basics --- RootSudo --- Wireless-Info --- SolvedThreads

  3. #3
    Join Date
    Nov 2009
    Beans
    21

    Re: Not able to delete files from Transcend 8gb flash drive

    Quote Originally Posted by ajgreeny View Post
    Does it have a small physical Read-only slide or switch?

    With it attached and mounted what does the mount command output?
    It does not seem to have a switch or a slide.

    I don't understand your question " .... what does the mount command output?" When I plug it in, a folder opens and displays the files in it. I tried almost everything that I could think of, trying to delete the files as root, trying to change the permissions, trying to format the flash drive using gparted. Nothing seems to work. Every time I get the error that it can only be read.

    Perhaps there is a command to mount it in such a way that one can also write to it. Any ideas?

    Thanks.

  4. #4
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Not able to delete files from Transcend 8gb flash drive

    What ajgreeny was asking you was to run the mount command in a terminal and post the output, which will give useful information about how the USB drive is mounted.

    So. Open a terminal and run this command:

    Code:
    mount
    You will get a few lines of output, only one of which is relevant, but please post the whole output. Don't try to retype the output into your post. You can copy and paste it by highlighting the output with the mouse -> right-click -> Copy. Then paste (ctrl-v) the output into your post. Please enclose the pasted output between [code] and [/code] tags for readability and to preserve formatting.
    Ubuntu 16.04 Desktop Guide - Ubuntu 17.10 Desktop Guide - Forum Guide to BBCode - Using BBCode code tags - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  5. #5
    Join Date
    Nov 2009
    Beans
    21

    Re: Not able to delete files from Transcend 8gb flash drive

    Code:
    $ mount
    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
    proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
    udev on /dev type devtmpfs (rw,nosuid,relatime,size=4015812k,nr_inodes=1003953,mode=755)
    devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
    tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=807212k,mode=755)
    /dev/sda4 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
    securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
    tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
    tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
    cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
    pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
    efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
    cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
    cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
    cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
    cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
    cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
    cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
    cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
    cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
    cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
    cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
    systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=24,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
    hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
    debugfs on /sys/kernel/debug type debugfs (rw,relatime)
    mqueue on /dev/mqueue type mqueue (rw,relatime)
    fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
    /dev/sda5 on /home type ext4 (rw,relatime,data=ordered)
    /dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
    /dev/sda6 on /Ronnie type vfat (rw,relatime,gid=46,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
    binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
    tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=807212k,mode=700,uid=1000,gid=1000)
    gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
    /dev/sdb1 on /media/ronnie/B2C6-0E24 type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
    The last line is the relevant one, that is, the one "/dev/sdb1 on ....".

  6. #6
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Not able to delete files from Transcend 8gb flash drive

    Indeed it is.

    I can't see anything that would explain why you can't delete stuff on it. It's mounted read-write. By the way, you can't change permissions of files on a Microsoft filesystem, which is what FAT32 is. The permissions are set by the mount options.

    Please elaborate on what you mean by "not able to delete anything". Were you using a GUI file browser and, if so, what exactly did you try to do, and what error message, if any, did you see? Or were you using the terminal?

    Also, what happened when you tried to delete the partition using Gparted? My guess is that the partition was still mounted. It has to be unmounted for Gparted to be able to delete it. I doubt whether deleting the partition would have helped you in any way, but it would be of value to know what happened.
    Ubuntu 16.04 Desktop Guide - Ubuntu 17.10 Desktop Guide - Forum Guide to BBCode - Using BBCode code tags - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  7. #7
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    6,301
    Distro
    Xubuntu Development Release

    Re: Not able to delete files from Transcend 8gb flash drive

    It looks as though it is mounted on /media/ronnie/B2C6-0E24. It is mounted read-write, so ronnie should be able to delete the files.
    How are you trying to delete them?

    Can you open a terminal in the drive and run the command
    Code:
    ls -l | head
    and post the output. That should tell us about the apparent file permissions. You won't be able to change many permissions or change the ownership because it's a FAT filesystem that cannot store them, but you should be able to change the read-only flag.

    I am not sure that root would be allowed to delete them, because the drive has been auto-mounted for ronnie. EDIT: trial & error here, yes root can delete them.
    Also, while the drive is mounted, you cannot format it - it is in use. Unmount it before trying to format it.
    Last edited by The Cog; May 19th, 2017 at 10:24 PM.

  8. #8
    Join Date
    Nov 2009
    Beans
    21

    Re: Not able to delete files from Transcend 8gb flash drive

    The whole purpose of creating a FAT32 file system was thinking that I would be able to read the files in Windows as well (this was a terrible decision since I rarely use windows).

    I was being really careless and hasty while using Gparted, and I don't really remember what I did. But something screwed up. I wonder if there is some problem with the pen drive.

    ls -al gives the output

    -rw-r--r--

    and in the terminal the command

    sudo chmod 777 *

    does nothing. So I really don't understand what is going on. Does this response answer your question? If you want more details, I'll be happy to post outputs of commands I give on the terminal.

    Code:
    ls -l | head
    outputs only a few of the files

    Code:
    ls -l | head
    total 52
    drwxr-xr-x 7 ronnie ronnie 24576 May 20 02:42 Books
    drwxr-xr-x 2 ronnie ronnie 28672 May 19 23:03 Papers
    If I change directory to Books and give the command

    Code:
    ls -al
    Then I a get the whole list of books. But in the same directory giving the command

    Code:
    ls -l | head
    lists only the first few, the precise output being

    Code:
     ls -l | head
    total 985904
    -rw-r--r-- 1 ronnie ronnie  3418634 Aug  8  2016 AlgOslo.djvu
    -rw-r--r-- 1 ronnie ronnie  3751026 Aug  8  2016 AlgTokyo1982.djvu
    -rw-r--r-- 1 ronnie ronnie  1045579 Aug  8  2016 AltTheory.djvu
    -rw-r--r-- 1 ronnie ronnie  2436591 Aug  8  2016 An.djvu
    -rw-r--r-- 1 ronnie ronnie  5038298 Aug  8  2016 ArCurves.djvu
    -rw-r--r-- 1 ronnie ronnie   372701 Aug  8  2016 ArtSaces.djvu
    drwxr-xr-x 2 ronnie ronnie     4096 May 19 23:05 ArTopologies
    -rw-r--r-- 1 ronnie ronnie  1630194 May 19 23:06 Ash.pdf
    -rw-r--r-- 1 ronnie ronnie  1672440 Aug  8  2016 AtAlgebra.djvu
    With the flash drive unmounted I started the graphical interface of GParted and try to delete the partition.

    I get an error saying "Can't write to /dev/sdb as it is opened read-only".
    Last edited by howefield; May 20th, 2017 at 10:23 AM. Reason: posts merged.

  9. #9
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    6,301
    Distro
    Xubuntu Development Release

    Re: Not able to delete files from Transcend 8gb flash drive

    Yes, head only prints the first ten lines passing through it by default - I didn't want you getting a list hundreds of lines wrong - the first ten is enough to see what's up. Nothing is up, it all looks normal.

    Can you change into that directory again and use the command
    Code:
    rm AlgOslo.djvu
    Let's see if the file gets deleted or if there is a helpful error message.

    EDIT: also, that gparted message looks odd. Can you post the output of
    Code:
    ls -l /dev/sd*
    Last edited by The Cog; May 19th, 2017 at 10:41 PM.

  10. #10
    Join Date
    Nov 2009
    Beans
    21

    Re: Not able to delete files from Transcend 8gb flash drive

    This is really strange. When I give the command
    Code:
     rm AlgOslo.djvu
    There is no error message. On giving
    Code:
    ls
    I see that the file is still there.

    The output of
    Code:
     ls -l /dev/sd*
    is
    Code:
    ls -l /dev/sd*
    brw-rw---- 1 root disk 8,  0 May 20 03:09 /dev/sda
    brw-rw---- 1 root disk 8,  1 May 20 03:09 /dev/sda1
    brw-rw---- 1 root disk 8,  2 May 20 03:09 /dev/sda2
    brw-rw---- 1 root disk 8,  3 May 20 03:09 /dev/sda3
    brw-rw---- 1 root disk 8,  4 May 20 03:09 /dev/sda4
    brw-rw---- 1 root disk 8,  5 May 20 03:09 /dev/sda5
    brw-rw---- 1 root disk 8,  6 May 20 03:09 /dev/sda6
    brw-rw---- 1 root disk 8,  7 May 20 03:09 /dev/sda7
    brw-rw---- 1 root disk 8,  8 May 20 03:09 /dev/sda8
    brw-rw---- 1 root disk 8, 16 May 20 03:11 /dev/sdb
    brw-rw---- 1 root disk 8, 17 May 20 03:10 /dev/sdb1
    Last edited by howefield; May 20th, 2017 at 10:23 AM. Reason: posts merged.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

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