0

I need to work in a foreign Linux server. Here we need to use a single user account (and obviously a single password) for around 5-6 people to log in. So my folder is visible to the other people who are logging in with the same user account. But for some reasons, I don't want to keep my folder visible to them. How can I make my folder password-protected using the terminal? I have no root access, so no sudo command is applicable. The server is using Red Hat Enterprise Linux Server release 7.4 (Maipo).

2 Answers 2

1

EncFS should work without root, and as long as you umount / close the encrypted folder when you're done no one else should have access to it.

Or a single eCryptFS folder that's not automatically decrypted on login (you only enter the passphrase to open it) might work too, but that probably requires root.

A LUKS or VeraCrypt container also might work, but would also require root (unless they could be installed to have root access themselves).


Or, another idea is just storing your folder in a gpg encrypted tar file would keep it secure when not in use. Extracting the files to a ramfs (tmpfs could be cached to disk) for use, then re-encrypting afterwards. Setting up a ramfs or tmpfs probably needs root too. Unless you don't mind having the (deleted) plaintext copies of the files lying around, shred might possibly help overwrite them.

3
  • 3
    if course, if he has it mounted and is doing work one of the others with the same username/pass can connect in and have access.
    – ivanivan
    May 29, 2018 at 0:15
  • 2
    @ivanivan That's the problem with not having their own account, it's like trying to hide something from your right eye & only look with your left. But the question doesn't specify if everyone is logged in at the same time, if not there's hope
    – Xen2050
    May 29, 2018 at 0:19
  • Two or more people may be logged in at the same time from different PCs. Will it work then? May 29, 2018 at 3:58
0

How can I make my folder password-protected using the terminal?

If you are looking for a way to safely park some data then have a look into the ways of creating mountable disk images that are encrypted or just tar the contents of folder and crypt it.

If you all have the same login then any command that you do could be undone by another with the same id. Could also look at mounting some external space from the cloud but that would be visible to all while it was mounted.

1
  • The main question is to find "ways of creating mountable disk images that are encrypted or just tar the contents of folder and crypt it"...
    – Xen2050
    May 28, 2018 at 23:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .