{ "id": "5812b315-e7bd-4265-b51f-863c02174c28", "snapshot": "os", "instruction": "Please create an SSH user named \"charles\" with password \"Ex@mpleP@55w0rd!\" on Ubuntu who is only allowed to access the folder \"test1\".", "source": "https://superuser.com/questions/149404/create-an-ssh-user-who-only-has-permission-to-access-specific-folders", "config": [ { "type": "execute", "parameters": { "command": "mkdir /test1", "shell": true } } ], "trajectory": "trajectories/", "related_apps": [ "os" ], "evaluator": { "func": "exact_match", "result": { "type": "vm_command_line", "command": "[[ $(getent passwd charles) && $(getent passwd charles | cut -d: -f6) = \"/test1\" ]] && echo \"User charles exists and has /test1 as their home directory\" || echo \"User charles does not exist or doesn't have /test1 as their home directory\"", "shell": true }, "expected": { "type": "rule", "rules":{ "expected": "User charles exists and has /test1 as their home directory" } } } }