Announcement

Collapse
No announcement yet.

[SOLVED]empty ext4 formated partition is write protected

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

    [SOLVED]empty ext4 formated partition is write protected

    I just formated an ntfs partition to ext4 with gparted because I needed space for programs and now I have no access to it at all. Can not copy, write nothing.

    Tried "sudo mkdir /sdb2/test" the result was "no such file or directory"
    Tried "sudo mkdir /dev/sdb2/test" the result was "no such file or directory"
    Tried "sudo mkdir /media/user/a9068c68-8200-43d8-a7f7-0d23c01cae67/Test" again "no such file or directory"

    In the rightklick menu every option is greyed.

    df shows a list and in that list the drive is shown as follows: /dev/sdb2 152855008 28 145017600 1% /media/user/a9068c68-8200-43d8-a7f7-0d23c01cae67

    I have no clue what is going on. Why is an empty formated partition write protected in any case? There is no common sense to that at all.
    Last edited by Fred-VIE; Aug 19, 2022, 05:27 PM.

    #2
    What is in /etc/fstab concerning that partition?
    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


      #3
      nothing in there about that, just sda2 (swap)and sde5 (kubuntu boot drive) in there
      Last edited by Fred-VIE; Aug 19, 2022, 04:42 PM.

      Comment


        #4
        Well, there you go. Without an fstab entry for that partition, you have to manually mount it before you can do anything with it.
        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
          On Linux, newly created file systems usually only have 'root' ownership and write permissions, particularly on internal drives

          Originally posted by Fred-VIE View Post
          Tried "sudo mkdir /sdb2/test" the result was "no such file or directory"
          Tried "sudo mkdir /dev/sdb2/test" the result was "no such file or directory"
          Of course there is no directory found, as /dev/sdb2 is not really an actual location, but a device.

          Originally posted by Fred-VIE View Post
          Tried "sudo mkdir "sudo mkdir /media/user/a9068c68-8200-43d8-a7f7-0d23c01cae6/Test" again "no such file or directory"

          sudo mkdir "sudo mkdir blah blah"
          makes no sense to the system, as it is redundant

          You will want to give the mount point ownership to your user account
          sudo chown username:username /media/username/a9068c68-8200-43d8-a7f7-0d23c01cae6
          Then you can create folders using dolphin, or using mkdir, without using sudo.

          Comment


            #6
            Originally posted by Snowhog View Post
            Well, there you go. Without an fstab entry for that partition, you have to manually mount it before you can do anything with it.
            Dolphin/Plasma's automount is mounting it at /media/user/a9068c68-8200-43d8-a7f7-0d23c01cae6/ It just needs user ownership on the mount point

            Comment


              #7
              Originally posted by claydoh View Post

              sudo mkdir "sudo mkdir blah blah"
              makes no sense to the system, as it is redundant
              That was just a mistake while copying/writing.

              Originally posted by claydoh View Post
              You will want to give the mount point ownership to your user account
              sudo chown username:username /media/username/a9068c68-8200-43d8-a7f7-0d23c01cae6
              Then you can create folders using dolphin, or using mkdir, without using sudo.
              That was it! Thanks!

              How can I avoid that in the first place? New empty partitions who are writeprotected are kinda pointless.

              Comment


                #8
                Originally posted by Snowhog View Post
                Well, there you go. Without an fstab entry for that partition, you have to manually mount it before you can do anything with it.
                The partition was mounted and everytime it was mounted it was not accessible.

                It can not be true that every partition/drive must be in fstab to be able to write on them because selecting them in Dolphin mounts them to begin with.
                Also none but my boot drive is in fstab and they can all be accessed, copied and written upon and I have four more.

                Comment


                  #9
                  Originally posted by Fred-VIE View Post
                  It can not be true that every partition/drive must be in fstab to be able to write on them because selecting them in Dolphin mounts them to begin with.
                  You are correct. My focus wasn't "in focus"! hehe
                  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


                    #10
                    Originally posted by Fred-VIE View Post
                    How can I avoid that in the first place? New empty partitions who are writeprotected are kinda pointless.
                    You can't. "it is a feature, not a bug" Well, you probably can, via some arcane system configuration, maybe.
                    Note that this doesn't happen with USB devices, but those generally are not formatted in a file system that use such permissions features (Fat/ExFAT, for example, do not).

                    it is not 'protected", it is just that Linux, being highly developed around both network operation and finer grained user level permissions.
                    I don't think any distribution is going to open up a major security hole by having user permissions on newly created ext4 file systems as a default. Plus, it isn't terribly difficult to do, once you know.

                    I imagine someone could code things to try and figure out if a new partition needs different sets of permissions, but none of those people are interested in doing this sort of (not at all) simple thing so much, unfortunately.

                    Comment


                      #11
                      Originally posted by claydoh View Post
                      You can't. "it is a feature, not a bug"
                      It would be a feature if creating/formating a partition would not ask for admin permissions and thus setting admin permissions in the first place making it user accessable without any further ado.

                      Or at least ask when it is created what permissions it should apply. That would be alot more transparent.

                      But ofc you can not do anything about that.

                      Comment


                        #12
                        Originally posted by Fred-VIE View Post
                        ask for admin permissions and thus setting admin permissions in the first place
                        Well, that IS the feature. The file EXT4 file system by nature and design defaults to root ownership, and requires sudo/root access to create or modify.
                        Sure, someone could create a tool that has such a capability, exposing all the dozens and dozens of options (and it would be cool to have). But for whatever reason, no one out there has felt the need or desire to do so.

                        Comment

                        Working...
                        X