Add a record for the filesystem to /etc/fstab and make sure that the mountpoint for the filesystem has write permission for yourself.
If this is a system-wide mount, then the mountpoint will typically be root-owned and then by default, you won’t have write permission on that unless you change the permissions and/or ownership of the mountpoint. In addition to that, ext4 is a POSIX filesystem, which uses permissions and ownership metadata for every individual file. FAT-based filesystems don’t store any such information, and in that case, the information is faked in the virtual filesystem layer of the kernel at mount time, and discarded again when the filesystem is unmounted.
If this filesystem is to be used in your user account only, then set the mountpoint to a directory under your $HOME.
I made a mount point in my home folder, created an fstab entry and mounted it there. At first it worked. Then I got IO errors, but since then I can automount it with rw. No idea why…
The solution actually doesn’t work. I was just marking something as solution because I didn’t have time to solve it and was feeling bad because so many people replied. Anyway, when I try to chown, I get a bunch of messages like
chown: Changing own of 'directory': The file system is read-only
Could you provide the exact command you used and filesystem type where that directory is mounted?
It would also help to provide the command/config you used to mount the drive…
My fstab looks normal. I don’t think it has something to do with it.
# /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>
UUID=3AD2-9AC0 /boot/efi vfat umask=0077 0 2
UUID=a2f3e649-9263-4ff5-a6cb-047f0b645cb7 / ext4 defaults,noatime 0 1
UUID=7c399a75-036d-4bf9-9bba-751536bb90b3 /home ext4 defaults,noatime 0 2
I think there is a mixed problem here. One of my USB keys has definitely crapped out. For the others I managed to get access by reformatting them. When I run into problems again, I will let you know.
@TriMoon There were no suspicious messages when running dmesg, that is why I didn’t post it.
I don’t recall (or can see in any reply) that i asked for that output…
But anyhow just like you can’t know what is inside other’s heads, no one can in return know about your hardware in details.
That’s why providing info that seems irrelevant to you, but is recommended in that link i provided, will help others to help you better.
If people need extra info they will ask for it on top of that info
chown: changing group of '/run/media/bash/backup/timeshift/snapshots/2021-07-24_07-00-10/localhost/usr/share/man/man3/CURLOPT_FNMATCH_FUNCTION.3.gz': Bad message
I already used the drive to make Timeshift backups.
Hi Ping, the “-R” will change the ownership and permissions of every file and folder, (recurring) but files in snapshots from Timeshift or BackInTime you don’t want to change them.
So in your case, assuming that "backup" is the mounted drive in the user “bash” directory, then you can just omit the -R like so;
sudo chown $USER:$USER /run/media/bash/backup
Ideally, this is best done before the drive is used. Go to /run/media/yourusername/ and create your directory, then run the command above.
Then once the empty directory is created and given the proper permissions, and the drive set to UUID as in the link above. Everything should work perfectly.
Hi, @DeLinuxCo . I tried what you mentioned, but I still can’t make it write to the drive directly. When I check permissions on the folder properties on the drive, they still say they’re in the root group and access is read only.