Debian Codegraph @

cli-tests/t_encrypt.out

raw
1
2 # Try to encrypt a nonexistent directory
3 [ERROR] fscrypt encrypt: no such file or directory
4 ext4 filesystem "MNT" has 0 protectors and 0 policies.
5 All users can create fscrypt metadata on this filesystem.
6
7 [ERROR] fscrypt status: file or directory "MNT/dir" is not
8 encrypted
9
10 # Try to encrypt a nonempty directory
11 [ERROR] fscrypt encrypt: Directory "MNT/dir" cannot be
12 encrypted because it is non-empty.
13
14 Files cannot be encrypted in-place. Instead, encrypt a new directory, copy the
15 files into it, and securely delete the original directory. For example:
16
17 mkdir "MNT/dir.new"
18 fscrypt encrypt "MNT/dir.new"
19 cp -a -T "MNT/dir" "MNT/dir.new"
20 find "MNT/dir" -type f -print0 | xargs -0 shred -n1 --remove=unlink
21 rm -rf "MNT/dir"
22 mv "MNT/dir.new" "MNT/dir"
23
24 Caution: due to the nature of modern storage devices and filesystems, the
25 original data may still be recoverable from disk. It's much better to encrypt
26 your files from the start.
27 ext4 filesystem "MNT" has 0 protectors and 0 policies.
28 All users can create fscrypt metadata on this filesystem.
29
30 [ERROR] fscrypt status: file or directory "MNT/dir" is not
31 encrypted
32
33 # => with trailing slash
34 [ERROR] fscrypt encrypt: Directory "MNT/dir/" cannot be
35 encrypted because it is non-empty.
36
37 Files cannot be encrypted in-place. Instead, encrypt a new directory, copy the
38 files into it, and securely delete the original directory. For example:
39
40 mkdir "MNT/dir.new"
41 fscrypt encrypt "MNT/dir.new"
42 cp -a -T "MNT/dir" "MNT/dir.new"
43 find "MNT/dir" -type f -print0 | xargs -0 shred -n1 --remove=unlink
44 rm -rf "MNT/dir"
45 mv "MNT/dir.new" "MNT/dir"
46
47 Caution: due to the nature of modern storage devices and filesystems, the
48 original data may still be recoverable from disk. It's much better to encrypt
49 your files from the start.
50 ext4 filesystem "MNT" has 0 protectors and 0 policies.
51 All users can create fscrypt metadata on this filesystem.
52
53 [ERROR] fscrypt status: file or directory "MNT/dir" is not
54 encrypted
55
56 # Encrypt a directory as non-root user
57 ext4 filesystem "MNT" has 1 protector and 1 policy.
58 All users can create fscrypt metadata on this filesystem.
59
60 PROTECTOR LINKED DESCRIPTION
61 desc1 No custom protector "prot"
62
63 POLICY UNLOCKED PROTECTORS
64 desc2 Yes desc1
65 "MNT/dir" is encrypted with fscrypt.
66
67 Policy: desc2
68 Options: padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:2
69 Unlocked: Yes
70
71 Protected with 1 protector:
72 PROTECTOR LINKED DESCRIPTION
73 desc1 No custom protector "prot"
74 ext4 filesystem "MNT" has 1 protector and 1 policy (only including ones owned by fscrypt-test-user or root).
75 All users can create fscrypt metadata on this filesystem.
76
77 PROTECTOR LINKED DESCRIPTION
78 desc1 No custom protector "prot"
79
80 POLICY UNLOCKED PROTECTORS
81 desc2 Yes desc1
82 "MNT/dir" is encrypted with fscrypt.
83
84 Policy: desc2
85 Options: padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:2
86 Unlocked: Yes
87
88 Protected with 1 protector:
89 PROTECTOR LINKED DESCRIPTION
90 desc1 No custom protector "prot"
91
92 # Try to encrypt an already-encrypted directory
93 [ERROR] fscrypt encrypt: file or directory "MNT/dir" is
94 already encrypted
95
96 # Try to encrypt another user's directory as a non-root user
97 [ERROR] fscrypt encrypt: cannot encrypt "MNT/dir" because
98 it's owned by another user (root).
99
100 Encryption can only be enabled on a directory you own,
101 even if you have write access to the directory.
102 ext4 filesystem "MNT" has 0 protectors and 0 policies.
103 All users can create fscrypt metadata on this filesystem.
104
105 [ERROR] fscrypt status: file or directory "MNT/dir" is not
106 encrypted