Announcement

Collapse
No announcement yet.

External drive files are read only after upgrade to 22.04.01

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    External drive files are read only after upgrade to 22.04.01

    Cannot access my external drive for write or delete even though the file have the same owner and group. The main drive folder has a different group that I am unable to change with either permissions tab or with chown, I get a read only error. This drive was completely accessible with 18.04

    MSI X299 Tomahawk
    Intel i7-7800X 6 core
    Asus Nvidia GeForce GTX1060 6GB​
    System:
    MSI X299 Tomahawk
    Intel i7-7800X 6 core
    MSI GeForce RTX4070 12GB

    #2
    Originally posted by Scorpa54 View Post
    The main drive folder has a different group that I am unable to change with either permissions tab or with chown,
    What user/group is this?

    An easy way to show a lot of this info: ls -la /media/username/external-driver-name/some-dirs-and-files

    Code:
    $ ls -la /media/claydoh/Stuff/
    total 1868572
    drwxrwxrwx 9 claydoh claydoh 4096 Jun 28 08:30 .
    drwxr-x---+ 1 claydoh claydoh 10 Sep 24 10:49 ..
    drwxrwxr-x 2 claydoh claydoh 4096 Oct 2 20:41 iso
    drwxrwxrwx 2 claydoh claydoh 16384 May 7 07:18 lost+found
    drwxrwxr-x 3 claydoh claydoh 4096 Aug 8 18:16 SteamLibrary2
    drwx------ 4 claydoh claydoh 4096 May 28 11:59 .Trash-1000
    drwxrwxr-x 6 claydoh claydoh 4096 Aug 13 14:47 vids
    drwxrwxr-x 2 claydoh claydoh 4096 Oct 1 15:20 virts
    -rw-rw-r-- 1 claydoh claydoh 1913365522 May 3 10:47 vosk-model-en-us-0.22.zip
    What file system is being used on the external drive?

    What is the exact chown command you tried, and what is the exact error message? A little more specifics are needed here.
    In any case, with full details, it should be a quick easy remedy, barring it being a hardware issue.



    Upgrading, even a couple of times, would not change user or group permission names, but I still am unclear if their associated User ID (UID) or Group ID (GID) could?
    I could see something happening if the removable drive were formatted with ext4, and one were trying to use the same drive on different installs that just happened to use different UID and GID numbers for that user account, even if the physical names were identical.
    But an upgrade would not change that, I don't think. As far as I can tell *buntu have not changed the default values for the first user accounts created on fresh installs in forever, if at all, ever.

    In general, this sort of thing is why ext4 and similar file systems can be a bit less useful for external drives, but only in terms of portability/multi-computer usage situations.

    Comment


      #3
      Originally posted by claydoh View Post
      What file system is being used on the external drive?

      What is the exact chown command you tried, and what is the exact error message? A little more specifics are needed here.
      In any case, with full details, it should be a quick easy remedy, barring it being a hardware issue.
      Th external is a drive with 3 partitions, all created with Kubuntu 18.04.
      sdb1 = fat32, an EFI partition
      sdb2 = hfsplus, a backup of my old Mac stuff, hardly ever touched.
      sdb3 = ext4[encrypted] no issues writing to this one
      sdb4 = ext4, can copy files from but no write or delete

      This is ls of the sdb4 partition
      Code:
      $ ls -la /media/drew/6bf099e8-75ed-4e46-83da-60b58994e4ad
      total 216
      drwxr-xr-x  27 drew users  4096 Aug 11 16:33  .
      drwxr-x---+  5 root root   4096 Oct  3 18:41  ..
      drwxrwxr-x   4 drew drew   4096 Oct  2 06:10  Backup
      drwxr-xr-x   5 drew users  4096 May 14  2018 'BC Marble'
      drwxrwxr-x   5 drew drew   4096 Aug  2 17:58 'blend files'
      drwxr-xr-x  10 drew users  4096 Oct  1 13:23  Documents
      drwxrwxr-x   4 drew drew   4096 Sep 21 13:25  Downloads
      drwxr-xr-x   3 drew users  4096 Jun  8  2018  Eventorbot_3D_printer
      drwxrwxr-x   2 drew drew   4096 Aug 11 16:33  Flashforge
      drwxrwxr-x   2 drew drew  12288 Aug  2 17:59  FreeCad
      drwxrwxr-x   5 drew drew   4096 Aug  2 17:59  G-code
      drwxr-xr-x   8 drew users  4096 Jun 10  2018  htdocs
      -rw-r--r--   1 drew users 10511 Jan 10  2015  Linux-cli.txt
      drwxr-xr-x   2 drew users  4096 Oct 24  2018 'linux distros'
      drwxrwxr-x   3 drew drew   4096 Aug  3 15:48  Machining
      drwxr-xr-x  27 drew users  4096 Jan  5  2019  MacWinbac
      drwxrwxr-x   3 drew drew   4096 Feb  6  2021  Movies
      drwxr-xr-x   2 drew users  4096 Jul  5  2018  mp4-mp3
      drwxr-xr-x   5 drew users 57344 Aug  3 15:58  Music
      -rw-r--r--   1 drew drew   5347 Aug 30  2018 'Phone book.rtf'
      drwxr-xr-x  23 drew users  4096 Aug  3 15:50  Pictures
      drwxrwxr-x   6 drew drew   4096 Feb  6  2021  Python
      drwxrwxr-x   3 drew drew   4096 Aug 24  2018  screensaver
      drwxrwxr-x   4 drew drew   4096 Aug  3 15:51  Sewing
      drwxr-xr-x   6 drew users  4096 Aug 15  2021 'SmallProgs Linux'
      drwxrwxr-x  10 drew drew  20480 Jul  9 10:35  STL-print
      drwxr-xr-x   2 drew users  4096 May  1 17:18  Tevo
      -rw-rw-r--   1 drew drew   4107 Sep  9  2018  text-symbols.txt
      -rw-r--r--   1 drew drew   2168 Apr 19  2020  useful-cli.txt
      drwxr-xr-x   6 drew users  4096 Aug  6 12:03  Videos
      drwxrwxr-x   4 drew drew   4096 Sep 17 07:32 'VirtualBox VMs'​
      ​
      Last edited by Snowhog; Oct 04, 2022, 07:07 AM.
      System:
      MSI X299 Tomahawk
      Intel i7-7800X 6 core
      MSI GeForce RTX4070 12GB

      Comment


        #4
        By chance, do you have the drive mounted via an entry in /etc/fstab? If yes, please show us your /etc/fstab file.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Originally posted by Snowhog View Post
          By chance, do you have the drive mounted via an entry in /etc/fstab? If yes, please show us your /etc/fstab file.
          # /etc/fstab: static file system information.
          #
          # Use 'blkid' to print the universally unique identifier for a
          # device; this may be used with UUID= as a more robust way to name devices
          # that works even if disks are added and removed. See fstab(5).
          #
          # <file system> <mount point> <type> <options> <dump> <pass>
          # / was on /dev/sda3 during installation
          UUID=0de62bd6-6214-4877-a954-30c284fca473 / ext4 errors=remount-ro 0 1
          # /boot/efi was on /dev/sda2 during installation
          UUID=176C-6246 /boot/efi vfat umask=0077 0 1
          /swapfile none swap sw 0 0

          ​Doesn't seem to match what is in the media folder
          file:///media/drew/6bf099e8-75ed-4e46-83da-60b58994e4ad
          file:///media/drew/b5aa42ae-ad86-4869-894d-95db82da71e5
          file:///media/drew/MacBac
          System:
          MSI X299 Tomahawk
          Intel i7-7800X 6 core
          MSI GeForce RTX4070 12GB

          Comment


            #6
            As far as I can tell, things look mostly OK, assuming that the account you are logged in to is actually 'drew' and not a different user.

            Some examples:

            drwxrwxr-x 4 drew drew 4096 Oct 2 06:10 Backup
            d=directory
            the first rwx means that the user has Read Write eXecute permissions
            The second means the user group has them

            drwxr-xr-x 3 drew users 4096 Jun 8 2018 Eventorbot_3D_printer
            Here, r-x​ indicates that the group has read and execute permissions, but not write (so no copy/delete)
            This is why I wonder if you are using different accounts, or maybe have done so on different computers.

            Now, if you only ever use this drive on one machine, and only for one account, you should be able to properly chown things to make the user and group be yours on all files and dirs:

            Code:
            sudo chown -R  drew:drew /media/drew/6b<tab-completion-cuz-its-too-long-lolz>
            if you want to see what file(s) have had any permissions changed, since we didn't look at specific files, you can change -R to -Rv, but that will just make a lot of useless text fly by the screen.

            Comment


              #7
              What type of external drive is it? Is it an SSD or a 'spinner'? Make and model and size?
              Windows no longer obstructs my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                Originally posted by claydoh View Post
                Now, if you only ever use this drive on one machine, and only for one account, you should be able to properly chown things to make the user and group be yours on all files and dirs:

                Code:
                sudo chown -R drew:drew /media/drew/6b<tab-completion-cuz-its-too-long-lolz>
                if you want to see what file(s) have had any permissions changed, since we didn't look at specific files, you can change -R to -Rv, but that will just make a lot of useless text fly by the screen.
                Yes the drive is only used on one machine and there is only one account.

                I gave the chown a try and got a lot of this..
                chown: changing ownership of '/media/drew/6bf099e8-75ed-4e46-83da-60b58994e4ad':
                Read-only file system


                ​Nothing seems to have changed.
                System:
                MSI X299 Tomahawk
                Intel i7-7800X 6 core
                MSI GeForce RTX4070 12GB

                Comment


                  #9
                  Originally posted by Snowhog View Post
                  What type of external drive is it? Is it an SSD or a 'spinner'? Make and model and size?
                  Iomega ego 2Tb
                  System:
                  MSI X299 Tomahawk
                  Intel i7-7800X 6 core
                  MSI GeForce RTX4070 12GB

                  Comment


                    #10
                    So the question is what is causing this particular partition to be read-only, but not the others? Assuming all the others are fine.
                    This sort of thing can potentially happen if you just unplug a drive without 'ejecting', iirc .

                    More info gathering time

                    fdisk -l (you can just post the relevant info from the external drive)
                    We are looking for for correct device for the mount

                    Then unmount/eject the drive, and run a system check on that partition. You can use Partition Manager for these steps.
                    Else:
                    sudo umount /dev/sdX#
                    using the correct device that corresponds to your desired partition. Make sure that this is not opened in Dolphin or being used or accessed by anything, or it will complain.
                    Then
                    sudo fsck /dev/sdX#

                    Comment


                      #11
                      Originally posted by claydoh View Post
                      So the question is what is causing this particular partition to be read-only, but not the others? Assuming all the others are fine.
                      This sort of thing can potentially happen if you just unplug a drive without 'ejecting', iirc .

                      More info gathering time

                      fdisk -l (you can just post the relevant info from the external drive)
                      We are looking for for correct device for the mount

                      Then unmount/eject the drive, and run a system check on that partition. You can use Partition Manager for these steps.
                      Else:
                      sudo umount /dev/sdX#
                      using the correct device that corresponds to your desired partition. Make sure that this is not opened in Dolphin or being used or accessed by anything, or it will complain.
                      Then
                      sudo fsck /dev/sdX#
                      I will give fsck a try, but you're going to love this, I had full access when I mounted the drive on my laptop using kubuntu 18.04. go figure

                      fdisk info

                      Device Start End Sectors SizeType
                      /dev/sdb1 40 409639 409600 200M EFI System
                      /dev/sdb2 409640 1703924223 1703514584 812.3G Apple HFS/HFS+
                      /dev/sdb3 1704187904 1954185215 249997312 119.2G Microsoft basic data
                      /dev/sdb4 1954185216 3907028991 1952843776 931.2G Linux filesystem


                      fsck info

                      drew@drew-MS-7B05:~$ sudo umount /dev/sdb4
                      drew@drew-MS-7B05:~$ sudo fsck /dev/sdb4
                      fsck from util-linux 2.37.2
                      e2fsck 1.46.5 (30-Dec-2021)
                      /dev/sdb4: recovering journal
                      /dev/sdb4 contains a file system with errors, check forced.
                      Pass 1: Checking inodes, blocks, and sizes
                      Pass 2: Checking directory structure
                      Pass 3: Checking directory connectivity
                      /lost+found not found. Create<y>? yes
                      Pass 4: Checking reference counts
                      Pass 5: Checking group summary information
                      Block bitmap differences: -(69828608--70025215)
                      Fix<y>? yes

                      /dev/sdb4: ***** FILE SYSTEM WAS MODIFIED *****
                      /dev/sdb4: 195745/61030400 files (0.9% non-contiguous), 76563525/244105472 block
                      s


                      That seems to have fixed things, thank you kindly.
                      Last edited by Scorpa54; Oct 04, 2022, 03:00 PM.
                      System:
                      MSI X299 Tomahawk
                      Intel i7-7800X 6 core
                      MSI GeForce RTX4070 12GB

                      Comment


                        #12
                        Apparently just unmounting/remounting can sometimes 'fix' things, but my quick guess is that the file system defaults in the old system may be more lax, or just different.

                        Comment

                        Working...
                        X