Linux

How to change or write permissions to a hard drive partition in Linux

But it turns out that there is a problem, you cannot copy or paste anything in this partition, it is locked and this is all due to write permissions, or a different case that you want to merge or join two partitions of a hard disk without losing data . This problem is very common so don’t worry as you are not the only one who gets headaches from this problem so the question is:

How do you solve this problem? Changing those permissions. We will show you what steps you must follow to do it the right way. We will also be using Linux Mint and it will also be necessary to enter some commands in the terminal,  however you can also delete a partition from my hard drive in Windows 10 .

Step 1: Know the UUID of the Linux EXT4 partition

What do we mean by UUID? You may wonder, its acronym stands for Universally unique identifier and it is a unique code for each partition. However, you must identify the name of the partition that you are going to unlock in the same way.

Usually the name it has is something like sdaX, where X can have any number like sda1, sda2 and so on. To do this you can go directly to the terminal or use the GParted software.

How to use the terminal to find out the UUID of an EXT4 partition?

windows uuid white background

Doing so is not very complicated, you just have to type the following command to enter it in the terminal: sudo fdisk –l. You will be able to see how all the ordered partitions appear on the screen. In this case, the partition that you must recover is sda6, so you must enter a command to the terminal again to identify the UUID of sda6:

  • sudo blkid

As you already have in mind that the partition that imports in this process is the sda6, you will be able to see its UUID code directly

How to use GParted to know the UUID of an EXT4 partition?

Since in this case you are going to use the GParted graphical interface to interact with the information of the partitions, then this method will be more visual. You must locate the sda6 partition, then click on it with your cursor, right click and then Information. You will be able to clearly see in the window that the UUID code will be displayed .

Step 2: Locate the partition mount point

Now that you know the UUID, it’s time for you to find where this partition mounts. You can usually locate this point easily since by default you can find it like this / media / <username>.

To do this, you must first execute the following command in the terminal, of course you must adapt the username to the one you have configured on your Linux system. For example we will use Carlos’s name:

  • ll / media / carlos

As you can see, it is very important to know the UUID beforehand as this will allow you to easily locate the partition you need.

Now that you have managed to do these two steps, you have enough information to change the write permissions of an EXT4 partition in Linux which is what you are here for, so let’s see what you should do in this last step.

Step 3: Change write permissions of an EXT4 partition in Linux

As we said before, these steps to follow are quite simple, and this last one in particular of giving write permissions to anyone who is using your PC with the chmod 777 command, is very easy.

It is important to note that doing this could leave a hole in your security and be exposed to anyone having access to any of the elements of the partition and even modifying it.

It is for this reason that we recommend that you avoid chmod 777 in practice . However, there is a more effective and optimal alternative that we will show you below. It is important that you know that for this process it is necessary that you have to execute 2 commands that we will show you now.

  • sudo chgrp adm / media / carlos / 76c50141-3a4c-459a-94ab-bf66cff189dd
  • sudo chmod g + w / media / carlos / 76c50141-3a4c-459a-94ab-bf66cff189dd

And ready!! You will no longer have any problem using your sheet music as storage, USB memory or hard disk. You will be able to copy, paste and cut all the elements you want without any type of restriction.

Leave a Reply

Your email address will not be published.

Back to top button