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.
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.
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.
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.
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
Set up the mount for those drives so each gets mounted appropriately. For example the first drive could be mounted at “/mnt/drive1”
Mount the drive partition.
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.
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.
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
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
```