How to protect home folder

While i am use a live linux booted pen-drive in my laptop i notice that i can access my fedora home folder and it’s contents ,also i can perform actions like cut,copy past on any file in home folder form live linux . how to lock/put password on home folder to avoid security problem.

Fedora Docs > Disk and File Encryption

1 Like

is it possible by changing read write permission of file

@astronaut
there’s a lot you need to learn about Linux. @vgaetera gave you a good option. You will not solve that problem by setting file permissions because booting with a pendrive gives the User elevated privileges. That is why Linux live-USBs are used for troubleshooting systems. If you really want to protect your data, encrypt /home.
Usually, you encrypt the /home partition during installation before putting files into it.

2 Likes

I’m curious about this. If I have encrypted my drive when I installed the OS (it requires a password for that before I log in now) does this keep the contents on my drive from being accessed via a live USB?

Yes and no, but mostly yes.

It does in the sense that if somebody were to boot from a live USB, they couldn’t just mount the drive & read the data - it would just be random bits*. It doesn’t in the sense that even from a live USB/different system/whatever, the files can still be decrypted using the password. Which is of course how it should be - you wouldn’t want your data to die with your system …

So in short: If you don’t have the password, then there is no way to get to the data. If you have the password, then you can get to the data no matter what system is mounting the drive.

*Technically, the live system would recognize the partition as encrypted, and ask for the password, rather than try and mount it, but even if you were to simply copy the data bit by bit, all you’d get is random-looking stuff.

2 Likes