使用 WebStorm 项目加密文件夹

使用 WebStorm 项目加密文件夹

我在 WebStorm 中有包含项目的文件夹。

folder/
    project1/
    project2/

我需要加密folder才能读取和写入。

每次我打开WebStorm 都需要输入用户密码。

我使用 Arch Linux。

你能帮我吗?

感谢您的任何帮助或任何提示!

答案1

对于类似的用例,我使用环境文件系统。它并不完美,但对于我的线程模型来说就很好了

sudo pacman -S --noconfirm encfs

这个想法是加密您的文件夹/文件并将解密的版本安装在空文件夹中。 EncFS 在用户空间中运行,只要它在运行(安装在文件系统用户空间中),就很容易受到可能的攻击。

这是一个完整的例子

$ mkdir -pv folder_encrypt folder_decrypt
mkdir: created directory 'folder_encrypt'
mkdir: created directory 'folder_decrypt'
$ encfs $(pwd)/folder_encrypt $(pwd)/folder_decrypt
Creating new encrypted volume.
Please choose from one of the following options:
 enter "x" for expert configuration mode,
 enter "p" for pre-configured paranoia mode,
 anything else, or an empty line will select standard mode.
?>

Standard configuration selected.

Configuration finished.  The filesystem to be created has
the following properties:
Filesystem cipher: "ssl/aes", version 3:0:2
Filename encoding: "nameio/block", version 4:0:2
Key Size: 192 bits
Block Size: 1024 bytes
Each file contains 8 byte header with unique IV data.
Filenames encoded using IV chaining mode.
File holes passed through to ciphertext.

Now you will need to enter a password for your filesystem.
You will need to remember this password, as there is absolutely
no recovery mechanism.  However, the password can be changed
later using encfsctl.

New Encfs Password:     XXXXXXXXXXXXXXXX
Verify Encfs Password:  XXXXXXXXXXXXXXXX
$ df -h | grep encfs
encfs                      2.0G  2.1M  2.0G   1% /tmp/folder_decrypt



$ cal -3 -m
     August 2019         September 2019         October 2019
Mo Tu We Th Fr Sa Su  Mo Tu We Th Fr Sa Su  Mo Tu We Th Fr Sa Su
          1  2  3  4                     1      1  2  3  4  5  6
 5  6  7  8  9 10 11   2  3  4  5  6  7  8   7  8  9 10 11 12 13
12 13 14 15 16 17 18   9 10 11 12 13 14 15  14 15 16 17 18 19 20
19 20 21 22 23 24 25  16 17 18 19 20 21 22  21 22 23 24 25 26 27
26 27 28 29 30 31     23 24 25 26 27 28 29  28 29 30 31
                      30

$ cal -3 -m > folder_decrypt/cal.log

$ cat folder_decrypt/cal.log
     August 2019         September 2019         October 2019
Mo Tu We Th Fr Sa Su  Mo Tu We Th Fr Sa Su  Mo Tu We Th Fr Sa Su
          1  2  3  4                     1      1  2  3  4  5  6
 5  6  7  8  9 10 11   2  3  4  5  6  7  8   7  8  9 10 11 12 13
12 13 14 15 16 17 18   9 10 11 12 13 14 15  14 15 16 17 18 19 20
19 20 21 22 23 24 25  16 17 18 19 20 21 22  21 22 23 24 25 26 27
26 27 28 29 30 31     23 24 25 26 27 28 29  28 29 30 31
                      30

$ fusermount -u folder_decrypt/


$ cat folder_decrypt/cal.log
cat: folder_decrypt/cal.log: No such file or directory


$ ls -la folder_encrypt/
total 8
drwxr-x---  2 ebal ebal   80 Sep 21 15:24 .
drwxrwxrwt 23 root root  660 Sep 21 15:22 ..
-rw-r-----  1 ebal ebal  528 Sep 21 15:24 4plrKclESUwxrBjD4iJhJRaX
-rw-r-----  1 ebal ebal 1297 Sep 21 15:23 .encfs6.xml

相关内容