Issue with USB drive and second SSD

I recently installed fedora for the first time and everything’s been going smoothly so far except that my second SSD and USB stick are read-only. When checking the proprieties-permissions they both have the owner as “Super User”, it also says “you are not the owner, so you cannot change these permissions”.

I get the feeling fixing this will involve the terminal but I know next to nothing about it or how to use it.

Thanks in advance!

Even Windows, where huge efforts have been made to allow users to avoid the terminal, fixing problems can require use of a terminal. I used to work in a group that did workshops teaching PhD level scientists how to use some specialized software (that was originally developed for SGI IRIX64, then ported to linux). In a 2-week workshop, we found it necessary to spend the first couple afternoons introducing linux and the command-line. Participants reported that even after they changed roles and weren’t using the software, the linux command-line background was a huge help. At the end of the 2 afternoons, we wanted users to be able to edit text files, navigate the filesystem, understand linux permissions,
use sudo for administrative tasks, how to use man, and have some trusted online reference material (such as Linux Command. As linux has grown in popularity, there are many online references and video tutorials – vast numbers of low-quality and outright misleading rehashes of a few really good references.

All linux distros share the same core features, and suffer from the difficulty of keeping reference material current. Arch linux often has excellent documentation. Debian reference material is also generally high quality. Fedora often introduces new stuff before other distros, so you do have to be aware that some things won’t be found anywhere else.

Well, thanks for the link. If i manage to fix the issue myself, i’ll come back and put the solution here.

Alright. ls -l on the /mnt folder shows that both drives are owned by root and have drwxr-xr-x permissions.
doing sudo chmod 777 on either drive seems to run but doing ls -l afterward shows that nothing changed.
I also tried doing sudo chown to change ownership but that throws “Operation not permitted” at me.

1 Like

Alright. ls -l on the /mnt folder shows that both drives are owned by root and have drwxr-xr-x permissions.
doing sudo chmod 777 on either drive seems to run but doing ls -l afterward shows that nothing changed.
I also tried doing sudo chown to change ownership but that throws “Operation not permitted” at me.

Is there something on the drives that needs to be owned by root?
If not then I suggest the following.

  1. Create a mount point in /mnt for each drive with a short simple name.
    sudo mkdir /mnt/drive1 and change its ownership sudo chown $USER:$USER /mnt/drive1
  2. Set up the mount for those drives so each gets mounted appropriately. For example the first drive could be mounted at “/mnt/drive1”
  3. Mount the drive partition.
  4. Now, and this is important, change ownership of the mount point and the mounted drive partition (file system) and content (recursively). sudo chown -R $USER:$USER /mnt/drive1.
    Once the chown has been done all future mounts of that drive partition at that mount point should remember the ownership and the user would have access.

I don’t believe it matters, but at one point I did the chown on the mount point (during step 1) before mounting the partition, then after mounting did the same thing recursively for the actual file system.

Note that you are showing permissions for the mount point and not for the drive itself when you run ls -l /mnt Ownership of the drive content can only be changed with using chown recursively with the drive mounted and as shown with the command in step 4 above.

For step 4, do I run the command you wrote there for each drive and does it or what exactly do I do?

The command must be modified and repeated for each mount point / partition of concern.

In fact, for each mount point / partition of concern the full sequence should be repeated as needed. I only gave examples.

One may see exactly how to use most commands by using man command-name or info command-name or command-name --help. Then for fully understanding of what is read one may try the commands on a test system to see and understand how they work.

I edited step 1 above to show the creation of the mount point and ownership change.

When you aren’t sure what a command does you can consult a reference. The Linux Command book Chapter 15 (Storage Media) or other references should explain. You can make up some simple exercises (create a directory in /tmp and try changing permissions, etc.) to make sure sure understand what each command does.

In general, internal drives are handled differently from some removable drives such as USB sticks and SD cards. Internal drives are usually mounted at boot time to a location specified in /etc/fstab along with external drives that should always be mounted (e.g., physically removable, but should not removed during normal operations and need to be mounted at boot time), while drives like USB sticks may be inserted and removed while the system is being used. Modern GUI environments support removable devices by mounting them in /run/media/<user>/<name> when they are connected. The Files application adds an “eject” button to be used when you want to remove the drive.

For drives mounted at boot time, you can configure options including ownshership in the /etc/fstab file.

i made the mount point, changed its ownership (put my username in the place of USER for the command and ran it), set up the drive to be mounted there in the gnome disk utilily, mounted it (also in the disk utility), ran the command in step four with my username in place of “USER” and it doesn’t work (I still cannot create folders or copy to the drive)

The command uses $USER not USER.
That is an instruction to the shell to replace $USER with the value of your username.
The shell is the program that reads line from you and excecutes them.
Usually the shell is the program bash.

Try this in a terminal.

$ echo USER is $USER

Has the drive been partitioned and formatted?

Did you mount the partition (not the device).?
For example a drive may be seen as /dev/sda but the partition may be /dev/sda1. In this example the partition /dev/sda1 would need to be formatted, then mounted.

What permissions exist on the device?
If mounted at /mnt/drive1 and owned by your user one should see something like

$  ls -ld /mnt
drwxr-xr-x. 4 root root 4096 Jan 18 18:00 /mnt

$  ls -ld /mnt/drive1
total 36
drwxr-xr-x. 69 USER USER 20480 Mar 13 20:54 drive1

Also please show the output of ls -ldZ /mnt/drive1 where you replace ‘drive1’ with the actual name of the mount point.

One may also run mount with no arguments to display everything that is mounted and confirm the drive is actually mounted as expected.

Well that shown my inexperience with the terminal and the commands then.
I did it again without replacing the USER and at the last command it throws Operation not permitted

I did infact name the mount point drive1 because at this point i just want it to work

If one replaces the ‘$USER’ with the actual user name it also should work.

Also, the drive has been formatted once from ntfs to fat32

That image shows that the drive is formatted as a dos fs (probably fat32) and as such does not support assigning ownership as is suitable for linux.

Please post the output of lsblk -f and sudo fdisk -l /dev/drive where you replace ‘drive’ with the actual name of the device. It may be something like /dev/sdc or similar, but you will need to identify it according to how you mounted it.

Also, when posting data from your screen here it is much preferred that one uses the actual text that is copied and pasted into the message. Images should only be used when absolutely necessary. Formatting may be retained by using the </> preformatted text tags available with the button on the toolbar which gives this.
type or paste code here

[gabi@fedora ~]$ sudo fdisk -l /dev/sda2
[sudo] password for gabi: 
Disk /dev/sda2: 931.5 GiB, 1000186314752 bytes, 1953488896 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

sda2 is the partition. Please repeat with /dev/sda

[gabi@fedora ~]$ sudo fdisk -l /dev/sda
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 870 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 3893BA49-4838-41D6-B183-015A10FFCBAD

Device     Start        End    Sectors   Size Type
/dev/sda1     34      32767      32734    16M Microsoft basic data
/dev/sda2  32768 1953521663 1953488896 931.5G Microsoft basic data