Locked out of my files

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Kefren
Level 4
Level 4
Posts: 264
Joined: Fri Dec 10, 2021 3:45 pm
Location: Scotland
Contact:

Locked out of my files

Post by Kefren »

I'm currently unable to run Mint after the installation failed (being dealt with in another post). As such, I am having to run a live USB in order to do things like access a browser.

Mint was installed on an SSD (currently seems to have been deleted) and my data was stored on a HDD. I want to access some of my files on the HDD. But when I click on the drive it says "You do not have the permissions necessary to view the contents". Argh! This is why I hate the idea of ownership, permissions etc on a single-user desktop PC, because the only person it has ever locked out of access (including when I had this problem once in Windows) is me!

So, is there an easy way I can access my files and folders on the data drive? (Without causing problems for if I get an OS installed on the SSD again, and access my data with that.)
Last edited by LockBot on Sat Jun 10, 2023 10:00 pm, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Pjotr
Level 24
Level 24
Posts: 20120
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Locked out of my files

Post by Pjotr »

A "quick and dirty" approach for getting access would be, to simply launch the file manager in the live session with root permissions:
https://easylinuxtipsproject.blogspot.c ... html#ID1.1
(item 1.1)

Don't repeat that on an installed system! It's just that in a live session you don't have to worry much about the fallout from that nuclear option.
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Kefren
Level 4
Level 4
Posts: 264
Joined: Fri Dec 10, 2021 3:45 pm
Location: Scotland
Contact:

Re: Locked out of my files

Post by Kefren »

Pjotr wrote: Wed Dec 07, 2022 3:27 pm A "quick and dirty" approach for getting access would be, to simply launch the file manager in the live session with root permissions:
https://easylinuxtipsproject.blogspot.c ... html#ID1.1
(item 1.1)

Don't repeat that on an installed system! It's just that in a live session you don't have to worry much about the fallout from that nuclear option.
Many thanks, that worked! An invaluable tip. If I get my PC working again in a proper OS, I'll add it to my notes. :-)
Kefren
Level 4
Level 4
Posts: 264
Joined: Fri Dec 10, 2021 3:45 pm
Location: Scotland
Contact:

Re: Locked out of my files

Post by Kefren »

Pjotr wrote: Wed Dec 07, 2022 3:27 pm A "quick and dirty" approach for getting access would be, to simply launch the file manager in the live session with root permissions:
https://easylinuxtipsproject.blogspot.c ... html#ID1.1
(item 1.1)

Don't repeat that on an installed system! It's just that in a live session you don't have to worry much about the fallout from that nuclear option.
Okay, that lets me view the files, but I need to copy them to a USB or desktop and I just realised I can't - if I try and drag them out, they give a permission denied error. So is there a way of being able to copy the files out? My PC won't let me install Linux so I'm having to do all this from the live USB. I want to copy out all the purchase info, hardware etc to put on a USB to pass on to someone who might be able to repair it. I also want to back up my HDD in case I have to send the PC off for repair.
User avatar
Pjotr
Level 24
Level 24
Posts: 20120
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Locked out of my files

Post by Pjotr »

Try copying them to a USB stick that has been formatted as FAT32.
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Locked out of my files

Post by linux-rox »

Kefren wrote: Thu Dec 08, 2022 6:26 am I also want to back up my HDD in case I have to send the PC off for repair.
If you're talking about a large number of files and/or a large aggregate copy, you would be best off (imho) doing this with rsync. It's a command line utility, but will do the job easily, works in a live session, and preserves permissions.

Boot a live session. Mount source partition and attach backup drive (presumably a USB hard drive). File system for target should match source (presumably ext4, as you wouldn't be getting permission squawks with ntfs). If not already, label the source and target partitions using GParted or Disks. For illustration, I'm going to assume you've labeled the source Data-Files and the target Data-Backups (notice, no spaces). In Terminal, run:

Code: Select all

sudo rsync -ahn --info=progress2 /media/mint/Data-Files/ /media/mint/Data-Backups
This is a dry run. Mostly it tells you how large the copy job will be. Also confirms you have identified the source correctly. Assuming that runs cleanly and you're confident the target is large enough, run the same command without the -n flag.

Code: Select all

sudo rsync -ah --info=progress2 /media/mint/Data-Files/ /media/mint/Data-Backups
Notice the slash after Data-Files. The -a flag is what preserves permissions (and a bunch of other things, see the man page). sudo is why the command works even though user mint has no permissions. Finally, --info=progress2 (plus -h) will give you real time feedback on how far the transfer has progressed, which you can compare by eye with the number you got when doing the dry run.

Note: rsync is directional, i.e., it copies only from source to target. Which is to say, the command I've given won't do anything to the HDD.
Kefren
Level 4
Level 4
Posts: 264
Joined: Fri Dec 10, 2021 3:45 pm
Location: Scotland
Contact:

Re: Locked out of my files

Post by Kefren »

Thanks both, this is useful.

At present my PC is dying and I am boxing it up for repair. It's clear that one of the hardware items is failing. I'll revisit this when (and if) I get my PC back! What an awful time for a piece of hardware to fail!
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Locked out of my files

Post by linux-rox »

Perhaps you know this already, but you can copy files off the HDD even if the computer has died. Simply remove the drive and connect it to another computer with a SATA-to-USB cable. You wouldn't want to use the drive that way, but it's fine for mounting temporarily to copy files.
Kefren
Level 4
Level 4
Posts: 264
Joined: Fri Dec 10, 2021 3:45 pm
Location: Scotland
Contact:

Re: Locked out of my files

Post by Kefren »

linux-rox wrote: Fri Dec 09, 2022 1:09 pm Perhaps you know this already, but you can copy files off the HDD even if the computer has died. Simply remove the drive and connect it to another computer with a SATA-to-USB cable. You wouldn't want to use the drive that way, but it's fine for mounting temporarily to copy files.
A useful tip, thanks! I think I have what I need from my recent backup and the few extra files I copied. I may have missed a few days of emails (since they're harder to separate out from the TB profile) but I can live without them, and if my PC comes back fine I'll have a chance to get those too after installing Linux again. THEN copy my new profile from this temp laptop back onto the PC. Ah, what fun. :-)
Locked

Return to “Beginner Questions”