Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot re-mount to folder (directory junction not released) #67

Closed
Owyn opened this issue Nov 16, 2016 · 6 comments
Closed

Cannot re-mount to folder (directory junction not released) #67

Owyn opened this issue Nov 16, 2016 · 6 comments

Comments

@Owyn
Copy link

Owyn commented Nov 16, 2016

Environment

  • Windows version: Win 10
  • Processor architecture: 64
  • Encfs4win version: RC10
  • Dokan version (legacy, modern): modern

Description

I mount to drive letter: - it mounts
I mount to a folder: - it just exits after password entering (tried running in admin mode, tried letting encfs create the directory (it creates fine))

Expected behavior vs. actual behavior

Steps to reproduce problem

Relevant logs

S:\WINDOWS\system32>"S:\Program Files (x86)\encfs\encfs.exe" --reverse -f -v "V:\Sync\UP" "V:\UP\Sync"
2016-11-16 15:21:01,479 WARN  [default] Caution: Mount directly to a drive letter (e.g., X:) to prevent file/folder not found issues!
2016-11-16 15:21:01,484 VER [main.cpp:696] Root directory: V:\Sync\360/
2016-11-16 15:21:01,484 VER [main.cpp:697] Fuse arguments: (fg) (encfs) (threaded) (keyCheck) (reverseEncryption) S:\Program Files (x86)\encfs\encfs.exe V:\UP\Sync -f -f -o use_ino -o default_permissions
2016-11-16 15:21:01,529 VER [FileUtils.cpp:296] found new serialization format
2016-11-16 15:21:01,531 VER [FileUtils.cpp:310] subVersion = 20100713
2016-11-16 15:21:01,533 VER [Interface.cpp:110] checking if ssl/aes(3:0:2) implements ssl/aes(3:0)
2016-11-16 15:21:01,534 VER [SSL_Cipher.cpp:328] allocated cipher ssl/aes, keySize 24, ivlength 16
2016-11-16 15:21:01,535 VER [FileUtils.cpp:1607] useStdin: 0
EncFS Password:
2016-11-16 15:21:06,687 VER [Interface.cpp:110] checking if ssl/aes(3:0:2) implements ssl/aes(3:0)
2016-11-16 15:21:06,697 VER [SSL_Cipher.cpp:328] allocated cipher ssl/aes, keySize 24, ivlength 16
2016-11-16 15:21:06,978 VER [FileUtils.cpp:1616] cipher key size = 44
2016-11-16 15:21:06,981 VER [Interface.cpp:110] checking if nameio/block(4:0:2) implements nameio/null(1:0)
2016-11-16 15:21:06,982 VER [Interface.cpp:110] checking if nameio/block32(4:0:2) implements nameio/null(1:0)
2016-11-16 15:21:06,984 VER [Interface.cpp:110] checking if nameio/null(1:0:0) implements nameio/null(1:0)
2016-11-16 15:21:06,986 VER [openssl.cpp:47] Allocating 41 locks for OpenSSL

S:\WINDOWS\system32>

and

S:\WINDOWS\system32>"S:\Program Files (x86)\encfs\encfs.exe" --reverse -f "V:\Sync\UP" "V:\UP\Sync" -- -d
2016-11-16 15:45:40,534 WARN  [default] Caution: Mount directly to a drive letter (e.g., X:) to prevent file/folder not found issues!
EncFS Password:
Dokan: debug mode on
Dokan: use stderr
AllocationUnitSize: 512 SectorSize: 512
device opened
CreateFile failed: V:\UP\Sync (32)
###QueryVolumeInfo -001
GetVolumeInformation
send release to \Volume{d6cc17c5-172d-4085-bce7-964f1e9f5de9}
Ioctl failed for wait with code 995.
Ioctl failed for wait with code 995.
Ioctl failed for wait with code 995.
Thread will be terminated
Thread will be terminated
Ioctl failed for wait with code 995.
Thread will be terminated
Ioctl failed for wait with code 995.
Thread will be terminated
Dokan Error: DokanMount Failed
Ioctl failed for wait with code 995.
Thread will be terminated
Thread will be terminated
Ioctl failed for wait with code 995.
Thread will be terminated
send global release for V:\UP\Sync
Ioctl failed for wait with code 995.
Thread will be terminated
Ioctl failed for wait with code 995.
Thread will be terminated
Ioctl failed for wait with code 995.
Thread will be terminated
DokanError: Ioctl failed with code 122
Failed to unmount: V:\UP\Sync
send global release for V:\UP\Sync
DokanError: Ioctl failed with code 122
Failed to unmount: V:\UP\Sync

S:\WINDOWS\system32>

Attach any relevant log files that can help to debug your issue (be sure to use the -v option for verbose logs).

@jetwhiz
Copy link
Owner

jetwhiz commented Nov 17, 2016

Hi @Owyn -- right now we have made encfs4win work only for mounting to drive letters due to an issue with either Dokany or Windows. Please refer to issue #51 for more details.

@Owyn
Copy link
Author

Owyn commented Nov 17, 2016

we have made encfs4win work only for mounting to drive letters

Then All I have left to do with it - is just uninstall it and find some old version without this "fix" ;c
cuz for cloud backup I need the program to write few database files into the root dir (which is impossible in case of drive letter mounting)

Can't you just make a warning with y/n choice instead?

My windows isn't "windows 7" and I'm not even sure case-sensitive bug applies to my files

@jetwhiz
Copy link
Owner

jetwhiz commented Nov 18, 2016

The functionality is not disabled, but you will just receive a warning saying, "Caution: Mount directly to a drive letter (e.g., X:) to prevent file/folder not found issues!"

I tried this on a Windows 10 machine and it seems to be working okay. What settings are you using?

virtualbox_windows 10_18_11_2016_17_42_28

@Owyn
Copy link
Author

Owyn commented Nov 19, 2016

Pretty weird, here's how I did it now:

  1. Tried mounting to folder - what?! - it worked
  2. Ok, let's try again... nope, doesn't work anymore ='(
    plus output folder wasn't deleted and now is no longer reusable - it asks to "create it? y/n" and with either choice doesn't work - already exists \ not created - stopping
  3. Tried deleting the folder or using another name for it - nope, no longer works...

Am I exiting the program incorrectly with ctrl+break or what? it seems to be stuck or broken after 1st use

S:\Program Files (x86)\encfs>encfs --reverse -f "V:\Sync\360" "V:\UP\Sync"
2016-11-19 14:38:39,372 WARN  [default] Caution: Mount directly to a drive letter (e.g., X:) to prevent file/folder not found issues!
EncFS Password:
2016-11-19 14:40:12,948 WARN  [default] Unmounting filesystem: V:\UP\Sync

S:\Program Files (x86)\encfs>encfs --reverse -f "V:\Sync\360" "V:\UP\Sync"
The directory "V:\UP\Sync" does not exist. Should it be created? (y,n) n
Directory not created.
Unable to locate mount point, aborting.Build: encfs4win version 1.10.1-RC10

Usage: encfs [options] rootDir mountPoint [-- [FUSE Mount Options]]

Common Options:
  -H                    show optional FUSE Mount Options
  -s                    disable multithreaded operation
  -f                    run in foreground (don't spawn daemon).
                        Error messages will be sent to stderr
                        instead of syslog.
  -v, --verbose         verbose: output encfs debug messages
  -i, --idle=MINUTES    Auto unmount after period of inactivity
  --anykey              Do not verify correct key is being used
  --forcedecode         decode data even if an error is detected
                        (for filesystems using MAC block headers)
  --public              act as a typical multi-user filesystem
                        (encfs must be run as root)
  --reverse             reverse encryption
  --extpass=program     Use external program for password prompt

Example, to mount at ~/crypt with raw storage in ~/.crypt :
    encfs ~/.crypt ~/crypt

For more information, visit https://github.com/jetwhiz/encfs4win


S:\Program Files (x86)\encfs>encfs --reverse -f "V:\Sync\360" "V:\UP\Sync"
The directory "V:\UP\Sync" does not exist. Should it be created? (y,n) y
2016-11-19 14:41:51,412 WARN  [default] Caution: Mount directly to a drive letter (e.g., X:) to prevent file/folder not found issues!
EncFS Password:

S:\Program Files (x86)\encfs>encfs --reverse -f "V:\Sync\360" "V:\UP\Sync2"
The directory "V:\UP\Sync2" does not exist. Should it be created? (y,n) y
2016-11-19 14:42:20,029 WARN  [default] Caution: Mount directly to a drive letter (e.g., X:) to prevent file/folder not found issues!
EncFS Password:

S:\Program Files (x86)\encfs>

@jetwhiz jetwhiz changed the title Doesn't mount to folder (only to disk letter) Cannot re-mount to folder (directory junction not released) Nov 19, 2016
@jetwhiz
Copy link
Owner

jetwhiz commented Nov 19, 2016

This part of it looks like a Dokany issue -- I submitted a bug report with them to see what we can do.

The "Ioctl failed for wait with code 995." errors are coming from the underlying Dokany portion of the software, which is preventing the directory junction from being released properly.

@jetwhiz jetwhiz reopened this Nov 19, 2016
@jetwhiz jetwhiz added this to the 1.10.1 milestone Nov 19, 2016
@jetwhiz jetwhiz added the fixed label Nov 20, 2016
@jetwhiz
Copy link
Owner

jetwhiz commented Nov 20, 2016

This has been fixed in Dokany, so it will be included in the next encfs4win RC.

@jetwhiz jetwhiz closed this as completed Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants