1
How can I make encfs4win
search for the encfs6
file in another location?
I tried modifying the encfs_mount.cmd
file at the end, like so:
set ENCFS6_CONFIG=c:/test1/.encfs6.xml
%pathtoencfs%encfs -f -v -d "%crypt%" "%decrypt%"
where crypt = c:\test4 and decrypt = J:
.
If I have the correct encfs6
file in c:\test4
then the volume mounts regardless of whether I add the set ...
line. But if I move the encfs6
file in c:\test1
then the application will get to the point where it asks for the password and then kind of does nothing else and then I close it; the drive does not appear to be mounted. I'm sure the ENCFS
variable is detected because if I use it like this: set ENCFS6_CONFIG=c:/test1/
I get something along the lines of "found config file c:\test1\ but failed to load"
so the variable has some effect.
Thank you in advance.
edit1:
BTW if you intend to test make sure you run all commands/ executable as admin
edit2: i tried on another pc .
I created and mounted the drive using a slightly modified version of the encfs_mount.cmd
file
@echo off
rem Batch file for mounting encfs encrypted folders
title encfs: Mount an encrypted folder to a decrypted one
rem Check if Windows XP or Windows 7
rem XP: C:\Documents and Settings (or language specific folder)
rem 7: C:\Users
set oprsystem=%appdata:~3,5%
if %oprsystem%==Users (
set ops=win7
) else (
set ops=winxp
)
set ininumber=1
rem An ini file will be created for future access
if not exist encfs.ini goto firsttime
set ininumber=0
rem List existing encrypted / decrypted folder pairs
echo Already existing encrypted / decrypted folder pairs:
echo.
for /F "tokens=1,2,3,4 delims=µ" %%i in (encfs.ini) do (
echo No.: %%i Name: %%j
echo Encrypted folder: %%k
echo Decrypted folder: %%l
echo.
)
echo.
echo Choose which pair should be mounted.
echo Type the corresponding number and press ENTER
echo Just press ENTER if you want to create a new pair.
echo.
set /p ininumber=Type number:
set new=yes
for /F "tokens=1,2,3,4 delims=µ" %%i in (encfs.ini) do (
if %%i==%ininumber% (
set crypt=%%k
set decrypt=%%l
set pair=%%j
set new=no
)
set number=%%i
)
if %new%==no goto mount
rem Increment ininumber for new folder pair
set /a ininumber= %number% + 1
:firsttime
rem First time use
rem Ask for folder locations
cls
echo Please enter the location for the folder
echo that will contain the encrypted files and press ENTER:
echo [e.g. d:\crypt - don't use a trailing backslash]
echo.
set /p crypt=
echo.
if %ops%==win7 echo Please enter the location for the drive
if %ops%==winxp echo Please enter the location for the folder
echo where you want to be able to access the decrypted files and press ENTER.
if %ops%==win7 echo [e.g. x: - don't use a trailing backslash]
if %ops%==winxp echo [e.g. d:\plain or x: - don't use a trailing backslash]
echo.
set /p decrypt=
echo.
echo Please enter a name for the encrypted / decrypted folder pair and press ENTER
echo [e.g. Secret Files]
echo.
set /p pair=
echo.
echo.
echo.
echo %ininumber%µ%pair%µ%crypt%µ%decrypt%>>encfs.ini
:mount
cls
echo Mount "%crypt%" to "%decrypt%"
if not exist "%crypt%" md "%crypt%"
rem If decrypt folder is a drive and encfs is on its first run decrypt folder is set to a temp folder
set lastchar=%decrypt:~-1%
if "%lastchar%"==":" (
if not exist "%crypt%.encfs6.xml" (
set decrypt="%temp%\decrypttemp"
if not exist "%temp%\decrypttemp" md "%temp%\decrypttemp"
echo.
echo IMPORTANT
echo After initialising encfs for the first time
echo please close this window and start "encfs_mount" again
echo.
pause
echo.
)
) else (
if not exist "%decrypt%" md "%decrypt%"
)
rem Mount encfs
set pathtoencfs=M:\kit\encfs4w\encfs4win\
set pathtolog=M:\kit\encfs4w\encfs4win\
set pathtowtee=M:\kit_util\
echo.
set ENCFS6_CONFIG=M:\test4.encfs6.xml
(%pathtoencfs%encfs -f -v -d "%crypt%" "%decrypt%") 2>&1 | %pathtowtee%wtee.exe -a %pathtolog%log.txt
echo.
so on this new pc %crypt%=m:\test1 and %decrypt%=j:
and here is the log file
20:57:27 (main.cpp:521) Root directory: m:\test1/
20:57:27 (main.cpp:522) Fuse arguments: (fg) (threaded) (keyCheck) M:\kit\encfs4w\encfs4win\encfs C:\Users\dabb\AppData\Local\Temp\decrypttemp -f -d -s -o use_ino -o default_permissions
20:57:27 (FileUtils.cpp:177) version = 20
20:57:27 (FileUtils.cpp:181) found new serialization format
20:57:27 (FileUtils.cpp:199) subVersion = 20100713
20:57:27 (Interface.cpp:165) checking if ssl/aes(3:0:2) implements ssl/aes(3:0:0)
20:57:27 (SSL_Cipher.cpp:372) allocated cipher ssl/aes, keySize 24, ivlength 16
20:57:27 (Interface.cpp:165) checking if ssl/aes(3:0:2) implements ssl/aes(3:0:0)
20:57:27 (SSL_Cipher.cpp:372) allocated cipher ssl/aes, keySize 24, ivlength 16
20:57:27 (FileUtils.cpp:1621) useStdin: 0
EncFS Password: 20:57:31 (Interface.cpp:165) checking if ssl/aes(3:0:2) implements ssl/aes(3:0:0)
20:57:31 (SSL_Cipher.cpp:372) allocated cipher ssl/aes, keySize 24, ivlength 16
20:57:31 (openssl.cpp:49) Allocating 41 locks for OpenSSL
20:57:31 (FileUtils.cpp:1627) cipher key size = 44
20:57:31 (Interface.cpp:165) checking if nameio/block(3:0:1) implements nameio/block(3:0:0)
Dokan: debug mode on
Dokan: use stderr
device opened
mounted: C:\Users\dabb\AppData\Local\Temp\decrypttemp -> \Volume{i delete the guid}
DokanRemoveMountPoint C:\Users\dabb\AppData\Local\Temp\decrypttemp
DokanControl recieved DeviceName:\Volume{i delete the guid}
send release
^C
UPDATE3: woa i can't believe no one is having this problem with non-default locations for .encfs6.xml
. Just to make it clear, despite the mounting done by DOKAN, the drive does not appear in my comp
UPDATE4: for now i found a workaround. Instead of storing the 'encfs6' file in a different location than the one where the encrypted files are, i store the encrypted content in a folder that is in another location.And i create a directory junction that points to the encrypted content, and store it in the folder with the 'encfs6' file.
So first i have
Encryptedfolder|--- .encfs6.xml |--- file1 (scrambledname) |--- file2 (scrambledname)
then i create the folder
Encryptedfolder |--- .encfs6.xml |--- file1 (scrambledname) |--- file2 (scrambledname) |--- folder1 (scrambledname)
i move all content except for folder1 (scrambledname)
to an external folder ( Dropbox )
Encryptedfolder|--- .encfs6.xml |--- folder1 (scrambledname)
afterwards i copy folder1(scrambledname)
s name and i use it to create a directory junction to the dropbox wuala teamdriver etc. folder. Of course you have to delete folder1 before that, because the junction must take the folder's place and trick encfs4win.
Encryptedfolder|--- .encfs6.xml |--- folder1 (scrambledname; this a junction to dropbox folder)
i still want to solve the problem with ENCFS6_CONFIG