| 1 |
|
| 2 |
# Enable v1 policies with fs keyring |
| 3 |
|
| 4 |
# Try to encrypt directory as user |
| 5 |
[ERROR] fscrypt encrypt: root is required to add/remove v1 encryption policy |
| 6 |
keys to/from filesystem |
| 7 |
|
| 8 |
Either this command should be run as root, or you should set |
| 9 |
'"use_fs_keyring_for_v1_policies": false' in /etc/fscrypt.conf, or you should |
| 10 |
re-create your encrypted directories using v2 encryption policies rather than v1 |
| 11 |
(this requires setting '"policy_version": "2"' in the "options" section of |
| 12 |
/etc/fscrypt.conf). |
| 13 |
[ERROR] fscrypt status: file or directory "MNT/dir" is not |
| 14 |
encrypted |
| 15 |
|
| 16 |
# Encrypt directory as user with --skip-unlock |
| 17 |
"MNT/dir" is encrypted with fscrypt. |
| 18 |
|
| 19 |
Policy: desc1 |
| 20 |
Options: padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:1 |
| 21 |
Unlocked: No |
| 22 |
|
| 23 |
Protected with 1 protector: |
| 24 |
PROTECTOR LINKED DESCRIPTION |
| 25 |
desc2 No custom protector "prot" |
| 26 |
mkdir: cannot create directory 'MNT/dir/subdir': Required key not available |
| 27 |
|
| 28 |
# Try to unlock directory as user |
| 29 |
[ERROR] fscrypt unlock: root is required to add/remove v1 encryption policy keys |
| 30 |
to/from filesystem |
| 31 |
|
| 32 |
Either this command should be run as root, or you should set |
| 33 |
'"use_fs_keyring_for_v1_policies": false' in /etc/fscrypt.conf, or you should |
| 34 |
re-create your encrypted directories using v2 encryption policies rather than v1 |
| 35 |
(this requires setting '"policy_version": "2"' in the "options" section of |
| 36 |
/etc/fscrypt.conf). |
| 37 |
|
| 38 |
# Unlock directory as root |
| 39 |
Enter custom passphrase for protector "prot": "MNT/dir" is now unlocked and ready for use. |
| 40 |
"MNT/dir" is encrypted with fscrypt. |
| 41 |
|
| 42 |
Policy: desc1 |
| 43 |
Options: padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:1 |
| 44 |
Unlocked: Yes |
| 45 |
|
| 46 |
Protected with 1 protector: |
| 47 |
PROTECTOR LINKED DESCRIPTION |
| 48 |
desc2 No custom protector "prot" |
| 49 |
|
| 50 |
# Try to lock directory as user |
| 51 |
[ERROR] fscrypt lock: root is required to add/remove v1 encryption policy keys |
| 52 |
to/from filesystem |
| 53 |
|
| 54 |
Either this command should be run as root, or you should set |
| 55 |
'"use_fs_keyring_for_v1_policies": false' in /etc/fscrypt.conf, or you should |
| 56 |
re-create your encrypted directories using v2 encryption policies rather than v1 |
| 57 |
(this requires setting '"policy_version": "2"' in the "options" section of |
| 58 |
/etc/fscrypt.conf). |
| 59 |
|
| 60 |
# Lock directory as root |
| 61 |
"MNT/dir" is now locked. |
| 62 |
cat: MNT/dir/file: No such file or directory |
| 63 |
"MNT/dir" is encrypted with fscrypt. |
| 64 |
|
| 65 |
Policy: desc1 |
| 66 |
Options: padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:1 |
| 67 |
Unlocked: No |
| 68 |
|
| 69 |
Protected with 1 protector: |
| 70 |
PROTECTOR LINKED DESCRIPTION |
| 71 |
desc2 No custom protector "prot" |
| 72 |
|
| 73 |
# Check that user can access file when directory is unlocked by root |
| 74 |
Enter custom passphrase for protector "prot": "MNT/dir" is now unlocked and ready for use. |
| 75 |
contents |