If I execute script
#!/usr/bin/expect
set pass [lindex $argv 0]
spawn encfs -v {CRIPT_DIR} {MNT_DIR} -o nonempty
expect "*EncFS Password:*"
send "$pass\r"
expect eof
expect script output:
zz@zz-com:/media/truecrypt5/mmm$./e.sh 1
spawn encfs -v /media/truecrypt5/mmm/cr /media/truecrypt5/mmm/mn -o nonempty
10:25:11 (main.cpp:523) Root directory: /media/truecrypt5/mmm/cr/
10:25:11 (main.cpp:524) Fuse arguments: (daemon) (threaded) (keyCheck) encfs /media/truecrypt5/mmm/mn -o nonempty -s -o use_ino -o default_permissions
10:25:11 (FileUtils.cpp:177) version = 20
10:25:11 (FileUtils.cpp:181) found new serialization format
10:25:11 (FileUtils.cpp:199) subVersion = 20100713
10:25:11 (Interface.cpp:165) checking if ssl/aes(3:0:2) implements ssl/aes(3:0:0)
10:25:11 (SSL_Cipher.cpp:370) allocated cipher ssl/aes, keySize 24, ivlength 16
10:25:11 (Interface.cpp:165) checking if ssl/aes(3:0:2) implements ssl/aes(3:0:0)
10:25:11 (SSL_Cipher.cpp:370) allocated cipher ssl/aes, keySize 24, ivlength 16
10:25:11 (FileUtils.cpp:1620) useStdin: 0
EncFS Password:
10:25:11 (Interface.cpp:165) checking if ssl/aes(3:0:2) implements ssl/aes(3:0:0)
10:25:11 (SSL_Cipher.cpp:370) allocated cipher ssl/aes, keySize 24, ivlength 16
10:25:12 (FileUtils.cpp:1628) cipher key size = 44
10:25:12 (Interface.cpp:165) checking if nameio/block(3:0:1) implements nameio/block(3:0:0)
ls command:
zz@zz-com:/media/truecrypt5/mmm$sudo ls -la
[sudo] password for zz:
ls: cannot access mn: Permission denied
total 24
drwx------ 4 zz zz 4096 2012-08-31 14:40 .
drwx------ 10 zz zz 4096 1970-01-01 03:00 ..
drwx------ 2 zz zz 4096 2012-08-30 18:56 cr
-rwx------ 1 zz zz 73 2012-08-30 18:54 e2.sh
-rwx------ 1 zz zz 178 2012-08-30 19:10 e.sh
d????????? ? ? ? ? ? mn
-rwx------ 1 zz zz 40 2012-08-30 18:52 u.sh
I don't have access to {MNT_DIR}. Sodo user don't have access to. But command or shell scipt
#!/bin/sh
encfs -v {CRIPT_DIR} {MNT_DIR} -o nonempty
work correct.
OS: Ubuntu 11.10
What is wrong in my expect script?
sudogot to do with scripting the password forencfs? Do you mean that something is different depending on whether you use expect or not? What is different? – Gilles Sep 3 '12 at 22:42