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

fuse-encfs-1.9.2 causes permission denied #398

Closed
pbiering opened this issue Sep 18, 2017 · 34 comments
Closed

fuse-encfs-1.9.2 causes permission denied #398

pbiering opened this issue Sep 18, 2017 · 34 comments
Milestone

Comments

@pbiering
Copy link

See also https://bugzilla.redhat.com/show_bug.cgi?id=1487354

particular home directories are encrypted at once, means

/home/group.encrypted <- encrypted directory
/home/group <- mounted via fuse

inside /home/group several user directories are existing like

/home/group/user1
/home/group/user2
/home/group/user3
...

effective mount options:

encfs on /home/group type fuse.encfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other)

and in this case it looks like that 1.9.2 will prevent any write now by normal user while it works still with 1.9.1

$ touch test123
touch: cannot touch ‘test123’: Permission denied

effective encfs process:

encfs --public --extpass=cat /etc/opt/encfs/=home=group.encrypt.pass /home/group.encrypt /home/group -o rw,dev,suid

checking with strace, the following lines look like:

[pid 5461] <... setresgid resumed> ) = -1 EPERM (Operation not permitted)
[pid 5458] <... rt_sigreturn resumed> ) = 202
[pid 5461] open("/home/group.encrypt/g9xbJePBJcxv84QVUpc3Zr1i/5oWBWnT4DJTD,,wXsn-OsUmX", O_WRONLY|O_CREAT|O_EXCL, 0100644 <unfinished ...>
[pid 5458] futex(0x7ffd2827ee60, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 5461] <... open resumed> ) = -1 EACCES (Permission denied)
[pid 5461] <... setresgid resumed> ) = -1 EPERM (Operation not permitted)
[pid 5458] <... rt_sigreturn resumed> ) = 202
[pid 5461] open("/home/group.encrypt/g9xbJePBJcxv84QVUpc3Zr1i/5oWBWnT4DJTD,,wXsn-OsUmX", O_WRONLY|O_CREAT|O_EXCL, 0100644 <unfinished ...>
[pid 5458] futex(0x7ffd2827ee60, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 5461] <... open resumed> ) = -1 EACCES (Permission denied)

but directory exists and unix permissions are proper....and it works with 1.9.1

@rfjakob
Copy link
Collaborator

rfjakob commented Sep 18, 2017

Hi, encfs runs as root?

@pbiering
Copy link
Author

yes, it is running as root via fstab:

/opt/encfs/bin/mount.encfs#/home/group.encrypt /home/group fuse auto 0 0

mount.encfs is finally executing what was shown above

@rfjakob
Copy link
Collaborator

rfjakob commented Sep 19, 2017

Hmm. Looking at your strace and at the mknod code, we see that setting the gid fails with:
EPERM (Operation not permitted).

Then the open() fails with:
EACCES (Permission denied)

But why, given that EncFS runs as root? Are you running on NFS?

@rfjakob
Copy link
Collaborator

rfjakob commented Sep 19, 2017

Can you post
cat /proc/ENCFSPID/status
?

@rfjakob
Copy link
Collaborator

rfjakob commented Sep 19, 2017

PS: The setfsgid error handler does not work because setfsgid does not return -1

    oldgid = setfsgid(gid);
    if (oldgid == -1) {
      int eno = errno;
      RLOG(DEBUG) << "setfsgid error: " << strerror(eno);
      return -EPERM;
    }

static __inline int setfsuid(uid_t uid) {

@pbiering
Copy link
Author

pbiering commented Sep 20, 2017

as requested:

Name:	encfs
State:	S (sleeping)
Tgid:	2380
Ngid:	0
Pid:	2380
PPid:	1
TracerPid:	0
Uid:	0	0	0	0
Gid:	0	0	0	0
FDSize:	64
Groups:	0 
VmPeak:	  370728 kB
VmSize:	  305192 kB
VmLck:	       0 kB
VmPin:	       0 kB
VmHWM:	    1864 kB
VmRSS:	    1864 kB
RssAnon:	     956 kB
RssFile:	     908 kB
RssShmem:	       0 kB
VmData:	  148408 kB
VmStk:	     132 kB
VmExe:	      56 kB
VmLib:	    9304 kB
VmPTE:	     136 kB
VmSwap:	       0 kB
Threads:	3
SigQ:	0/1874
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000000001000
SigCgt:	0000000180004003
CapInh:	0000000000000000
CapPrm:	0000001fffffffff
CapEff:	0000001fffffffff
CapBnd:	0000001fffffffff
CapAmb:	0000000000000000
Seccomp:	0
Cpus_allowed:	1
Cpus_allowed_list:	0
Mems_allowed:	00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:	0
voluntary_ctxt_switches:	9
nonvoluntary_ctxt_switches:	0

after downgrade to 1.9.1 and umount/mount here is the diff

--- fuse-proc-problem.txt	2017-09-20 05:46:18.846304208 +0000
+++ fuse-proc-ok.txt	2017-09-20 05:47:48.262450585 +0000
@@ -1,27 +1,27 @@
 Name:	encfs
 State:	S (sleeping)
-Tgid:	2380
+Tgid:	2445
 Ngid:	0
-Pid:	2380
+Pid:	2445
 PPid:	1
 TracerPid:	0
 Uid:	0	0	0	0
 Gid:	0	0	0	0
 FDSize:	64
 Groups:	0 
-VmPeak:	  370728 kB
-VmSize:	  305192 kB
+VmPeak:	  370704 kB
+VmSize:	  305168 kB
 VmLck:	       0 kB
 VmPin:	       0 kB
-VmHWM:	    1864 kB
-VmRSS:	    1864 kB
-RssAnon:	     956 kB
-RssFile:	     908 kB
+VmHWM:	    1884 kB
+VmRSS:	    1884 kB
+RssAnon:	     964 kB
+RssFile:	     920 kB
 RssShmem:	       0 kB
-VmData:	  148408 kB
+VmData:	  148420 kB
 VmStk:	     132 kB
-VmExe:	      56 kB
-VmLib:	    9304 kB
+VmExe:	     188 kB
+VmLib:	    9132 kB
 VmPTE:	     136 kB
 VmSwap:	       0 kB
 Threads:	3
@@ -41,5 +41,5 @@
 Cpus_allowed_list:	0
 Mems_allowed:	00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
 Mems_allowed_list:	0
-voluntary_ctxt_switches:	9
+voluntary_ctxt_switches:	1
 nonvoluntary_ctxt_switches:	0

voluntary_ctxt_switches differs somehow

@benrubson benrubson added this to the 1.9.3 milestone Sep 30, 2017
@benrubson
Copy link
Contributor

benrubson commented Sep 30, 2017

I managed to reproduce the setfsgid issue with encfs 1.9.2, as well as with encfs 1.9.1.

With non-root user, touching a file :

2017-09-30 20:39:39,306 VER created FileNode for /tmp/enc/ [DirNode.cpp:653]
2017-09-30 20:39:39,308 VER op: getattr : /tmp/enc/ [encfs.cpp:148]
2017-09-30 20:39:39,313 VER created FileNode for /tmp/enc/SumAze5zx8jrR5xtx6hVZTxO [DirNode.cpp:653]
2017-09-30 20:39:39,314 VER op: getattr : /tmp/enc/SumAze5zx8jrR5xtx6hVZTxO [encfs.cpp:148]
2017-09-30 20:39:39,314 DEBUG getAttr error on /tmp/enc/SumAze5zx8jrR5xtx6hVZTxO: No such file or directory [RawFileIO.cpp:167]
2017-09-30 20:39:39,314 DEBUG op: getattr error: No such file or directory [encfs.cpp:171]
2017-09-30 20:39:39,314 VER created FileNode for /tmp/enc/SumAze5zx8jrR5xtx6hVZTxO [DirNode.cpp:653]
2017-09-30 20:39:39,314 VER mknod on /tmp/enc/SumAze5zx8jrR5xtx6hVZTxO, mode 33188, dev 0 [encfs.cpp:281]
2017-09-30 20:39:39,317 VER setfsgid error: 1 [encfs.h:54]
2017-09-30 20:39:39,318 VER created FileNode for /tmp/enc/SumAze5zx8jrR5xtx6hVZTxO [DirNode.cpp:653]
2017-09-30 20:39:39,318 VER open call, requestWrite = 1 [RawFileIO.cpp:116]
2017-09-30 20:39:39,318 VER open file with flags 2, result = 4 [RawFileIO.cpp:135]
2017-09-30 20:39:39,319 VER encfs_open for /tmp/enc/SumAze5zx8jrR5xtx6hVZTxO, flags 34881 [encfs.cpp:560]
2017-09-30 20:39:39,319 VER op: fgetattr : /tmp/enc/SumAze5zx8jrR5xtx6hVZTxO [encfs.cpp:148]
2017-09-30 20:39:39,319 VER op: flush : /tmp/enc/SumAze5zx8jrR5xtx6hVZTxO [encfs.cpp:148]
2017-09-30 20:39:39,320 VER open call, requestWrite = 0 [RawFileIO.cpp:116]
2017-09-30 20:39:39,320 VER using existing file descriptor [RawFileIO.cpp:122]
2017-09-30 20:39:39,320 VER op: utimens : /tmp/enc/SumAze5zx8jrR5xtx6hVZTxO [encfs.cpp:96]
2017-09-30 20:39:39,320 VER op: getattr : /tmp/enc/SumAze5zx8jrR5xtx6hVZTxO [encfs.cpp:148]
2017-09-30 20:39:39,320 VER op: flush : /tmp/enc/SumAze5zx8jrR5xtx6hVZTxO [encfs.cpp:148]
2017-09-30 20:39:39,320 VER open call, requestWrite = 0 [RawFileIO.cpp:116]
2017-09-30 20:39:39,320 VER using existing file descriptor [RawFileIO.cpp:122]

With root user :

2017-09-30 20:40:13,582 VER created FileNode for /tmp/enc/ [DirNode.cpp:653]
2017-09-30 20:40:13,583 VER op: getattr : /tmp/enc/ [encfs.cpp:148]
2017-09-30 20:40:13,585 VER created FileNode for /tmp/enc/E0H51jxbdG2GQ3jFAQPmDA5O [DirNode.cpp:653]
2017-09-30 20:40:13,585 VER op: getattr : /tmp/enc/E0H51jxbdG2GQ3jFAQPmDA5O [encfs.cpp:148]
2017-09-30 20:40:13,585 DEBUG getAttr error on /tmp/enc/E0H51jxbdG2GQ3jFAQPmDA5O: No such file or directory [RawFileIO.cpp:167]
2017-09-30 20:40:13,585 DEBUG op: getattr error: No such file or directory [encfs.cpp:171]
2017-09-30 20:40:13,587 VER created FileNode for /tmp/enc/E0H51jxbdG2GQ3jFAQPmDA5O [DirNode.cpp:653]
2017-09-30 20:40:13,587 VER mknod on /tmp/enc/E0H51jxbdG2GQ3jFAQPmDA5O, mode 33188, dev 0 [encfs.cpp:281]
2017-09-30 20:40:13,588 VER created FileNode for /tmp/enc/E0H51jxbdG2GQ3jFAQPmDA5O [DirNode.cpp:653]
2017-09-30 20:40:13,588 VER open call, requestWrite = 1 [RawFileIO.cpp:116]
2017-09-30 20:40:13,588 VER open file with flags 2, result = 4 [RawFileIO.cpp:135]
2017-09-30 20:40:13,588 VER encfs_open for /tmp/enc/E0H51jxbdG2GQ3jFAQPmDA5O, flags 34881 [encfs.cpp:560]
2017-09-30 20:40:13,588 VER op: fgetattr : /tmp/enc/E0H51jxbdG2GQ3jFAQPmDA5O [encfs.cpp:148]
2017-09-30 20:40:13,589 VER op: flush : /tmp/enc/E0H51jxbdG2GQ3jFAQPmDA5O [encfs.cpp:148]
2017-09-30 20:40:13,589 VER open call, requestWrite = 0 [RawFileIO.cpp:116]
2017-09-30 20:40:13,590 VER using existing file descriptor [RawFileIO.cpp:122]
2017-09-30 20:40:13,590 VER op: utimens : /tmp/enc/E0H51jxbdG2GQ3jFAQPmDA5O [encfs.cpp:96]
2017-09-30 20:40:13,591 VER op: getattr : /tmp/enc/E0H51jxbdG2GQ3jFAQPmDA5O [encfs.cpp:148]
2017-09-30 20:40:13,591 VER op: flush : /tmp/enc/E0H51jxbdG2GQ3jFAQPmDA5O [encfs.cpp:148]
2017-09-30 20:40:13,592 VER open call, requestWrite = 0 [RawFileIO.cpp:116]
2017-09-30 20:40:13,592 VER using existing file descriptor [RawFileIO.cpp:122]
encfs on /tmp/dec type fuse.encfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other)

@rfjakob
Copy link
Collaborator

rfjakob commented Oct 1, 2017

I don't understand this at all. The strace of the OP shows that we call setresgid:

[pid 5461] <... setresgid resumed> ) = -1 EPERM (Operation not permitted)

However, looking at

if (setegid(gid) != 0) {

we see that the call to setegid (which ultimately calls setresgid) is wrapped in ifndef linux.

On my machine, I get this in strace:

[pid 19950] setfsuid(0)                 = 1026
[pid 19950] setfsgid(0)                 = 1026
[pid 19950] open("/tmp/tmp.m0wXeEWlRG/a/QEfKAbbz,DuFpkbI-jglILZ4", O_RDWR) = 3

EncFS calls setfsgid, as expected. There is something wrong with the RPM that @pbiering is using.

@benrubson
Copy link
Contributor

benrubson commented Oct 1, 2017

EncFS calls setfsgid, as expected.

Yes, but if it is called after setfsuid, it will fail.
This is why I reversed their order in #403.
Don't you manage to reproduce the setfsgid error, touching (creating) a file with a non-root user in a public EncFS, as shown above ?

@rfjakob
Copy link
Collaborator

rfjakob commented Oct 1, 2017

No, works fine here. setfsuid should not cause the later setfsgid to fail - and it does not, according my strace.

@benrubson
Copy link
Contributor

benrubson commented Oct 1, 2017

With master :

# encfs --public -fv /tmp/enc /tmp/dec
# su - ben
$ touch /tmp/dec/with_master
(...)
2017-10-01 18:13:02,876 VERBOSE created FileNode for /tmp/enc/J9kLgSb80p3ta-WXM5rzmrUj [DirNode.cpp:676]
2017-10-01 18:13:02,876 VERBOSE mknod on /tmp/enc/J9kLgSb80p3ta-WXM5rzmrUj, mode 33188, dev 0 [encfs.cpp:293]
2017-10-01 18:13:02,878 VERBOSE setfsgid error: Operation not permitted [encfs.h:56]
2017-10-01 18:13:02,881 VERBOSE created FileNode for /tmp/enc/J9kLgSb80p3ta-WXM5rzmrUj [DirNode.cpp:676]

With patch #403 :

# encfs --public -fv /tmp/enc /tmp/dec
# su - ben
$ touch /tmp/dec/with_patch
(...)
2017-10-01 18:14:23,899 VERBOSE created FileNode for /tmp/enc/c8wcjIM0JdRNLtY-9DhoeUAX [DirNode.cpp:676]
2017-10-01 18:14:23,899 VERBOSE mknod on /tmp/enc/c8wcjIM0JdRNLtY-9DhoeUAX, mode 33188, dev 0 [encfs.cpp:293]
2017-10-01 18:14:23,903 VERBOSE created FileNode for /tmp/enc/c8wcjIM0JdRNLtY-9DhoeUAX [DirNode.cpp:676]

Files' result :

$ ls -l /tmp/dec/
total 0
-rw-r--r-- 1 ben root 0 Oct  1 18:13 with_master
-rw-r--r-- 1 ben ben  0 Oct  1 18:14 with_patch

We clearly see that group of with_master file has not been correctly set.

@rfjakob
Copy link
Collaborator

rfjakob commented Oct 1, 2017

I can reproduce on CentOS 7. Here, EncFS calls setresuid, though I don't understand why:

[pid  3511] geteuid()                   = 0
[pid  3512] setresuid(-1, 1001, -1 <unfinished ...>
[pid  3512] <... setresuid resumed> )   = 0
[pid  3511] setresuid(-1, 1001, -1 <unfinished ...>
[pid  3511] <... setresuid resumed> )   = 0
[pid  3511] getegid( <unfinished ...>
[pid  3511] <... getegid resumed> )     = 0
[pid  3512] setresgid(-1, 1001, -1 <unfinished ...>
[pid  3512] <... setresgid resumed> )   = -1 EPERM (Operation not permitted)

@rfjakob
Copy link
Collaborator

rfjakob commented Oct 1, 2017

@benrubson I think there are two things to fix here:

  1. On non-linux platforms, the wrong group is used
  2. CentOS 7 thinks it is a non-linux platform

@benrubson
Copy link
Contributor

benrubson commented Oct 1, 2017

I think we should use #ifndef __linux__ instead of #ifndef linux :
https://github.com/vgough/encfs/blob/master/encfs/encfs.h#L37
Yep last commit to #403 solves the linux detection issue 👍

@rfjakob
Copy link
Collaborator

rfjakob commented Oct 1, 2017

Looks like the -std=c++11 flag drops the linux define:

$ g++ -dM -E -x c++ /dev/null | grep linux
#define __linux 1
#define __linux__ 1
#define __gnu_linux__ 1
#define linux 1

$ g++ -dM -E -x c++ -std=c++11 /dev/null | grep linux
#define __linux 1
#define __linux__ 1
#define __gnu_linux__ 1

$ echo "" | gcc -E -dM -c - | grep linux
#define __linux 1
#define __linux__ 1
#define __gnu_linux__ 1
#define linux 1

$ echo "" | clang -E - -dM | grep linux
#define __gnu_linux__ 1
#define __linux 1
#define __linux__ 1
#define linux 1

@benrubson
Copy link
Contributor

Good catch, you confirm !
PR should then be OK 👍

@rfjakob
Copy link
Collaborator

rfjakob commented Oct 1, 2017

Your change missed a few "ifdef linux", I'll push just this change in a new PR

rfjakob added a commit to rfjakob/encfs-next that referenced this issue Oct 1, 2017
The "linux" define is not available with "g++ -std=c++11",
which resulted in bug vgough#398 .

Available defines for gcc 7.1.1, g++ 7.1.7, clang 4.0.0:

$ g++ -dM -E -x c++ /dev/null | grep linux

$ g++ -dM -E -x c++ -std=c++11 /dev/null | grep linux

$ echo "" | gcc -E -dM -c - | grep linux

$ echo "" | clang -E - -dM | grep linux
rfjakob added a commit to rfjakob/encfs-next that referenced this issue Oct 1, 2017
The "linux" define is not available with "g++ -std=c++11",
which resulted in bug vgough#398 .

Available defines for gcc 7.1.1, g++ 7.1.7, clang 4.0.0:

$ g++ -dM -E -x c++ /dev/null | grep linux

$ g++ -dM -E -x c++ -std=c++11 /dev/null | grep linux

$ echo "" | gcc -E -dM -c - | grep linux

$ echo "" | clang -E - -dM | grep linux
@rfjakob
Copy link
Collaborator

rfjakob commented Oct 1, 2017

I would like to merge #405 first as this is the minimal fix for the problem the user is seeing.

For the other platforms, where do you test? FreeBSD?

@benrubson
Copy link
Contributor

benrubson commented Oct 1, 2017

Yes OK to merge #405 first, let's then continue with #403.

I made some tests on Linux Debian and #403 solved the issue (as Debian was also failing on the ifndef linux).
So it should solve the issue on any other non-linux platform.

rfjakob added a commit that referenced this issue Oct 1, 2017
The "linux" define is not available with "g++ -std=c++11",
which resulted in bug #398 .

Available defines for gcc 7.1.1, g++ 7.1.7, clang 4.0.0:

$ g++ -dM -E -x c++ /dev/null | grep linux

$ g++ -dM -E -x c++ -std=c++11 /dev/null | grep linux

$ echo "" | gcc -E -dM -c - | grep linux

$ echo "" | clang -E - -dM | grep linux
@benrubson
Copy link
Contributor

In addition #403 solves an issue where setfsuid / setfsgid return codes were not correctly used.

benrubson pushed a commit that referenced this issue Oct 1, 2017
- use these functions in the correct order ;
- correctly check for their return code.
This helps to correct #398.
@benrubson
Copy link
Contributor

OK @pbiering, your issue should be solved thanks to #405 (#403 completes the bug correction for other systems), feel free to re-open if needed 👍

@pbiering
Copy link
Author

pbiering commented Oct 2, 2017

  1. can confirm that latest master will work (again)

  2. I've tried to recompile master using source RPM from EPEL 7 and only replaced the tgz (and reference).

while fuse-encfs-1.9.2-3.el7.src.rpm rebuilded fine, I ran into issue.

/usr/bin/ld: vendor/github.com/muflihun/easyloggingpp/libeasyloggingpp.a(easylogging++.cc.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
vendor/github.com/muflihun/easyloggingpp/libeasyloggingpp.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

Looks like some benchmark code was included since 1.9.2? This can be solved by changing EL7 spec file:

-    CXXFLAGS="%optflags -std=gnu++11"
+    CXXFLAGS="%optflags -std=gnu++11 -fPIC"

In addition because of the by default (?) now installed benchmark headers and libraries, a bunch of files must be "removed" before packaging is successful:

# remove all include files
rm -fr %{buildroot}/usr/include/*

# remove all i386 benchmark/mock related libraries
rm -f %{buildroot}/%{_libdir}/libbenchmark*
rm -f %{buildroot}/%{_libdir}/libeasyloggingpp*
rm -f %{buildroot}/%{_libdir}/libgmock*
rm -f %{buildroot}/%{_libdir}/libgtest*
rm -fr %{buildroot}/%{_libdir}/cmake/*

rm -f %{buildroot}/usr/lib/libbenchmark*
rm -f %{buildroot}/usr/lib/libeasyloggingpp*
rm -f %{buildroot}/usr/lib/libgtest*
rm -f %{buildroot}/usr/lib/libgmock*
rm -fr %{buildroot}/usr/lib/cmake/*

-> there should be an option to build/install without that benchmark piece.

BTW: a bunch of warnings appearing during compilation, mostly "defined but not used" and some integer comparison" issues.

edit : see #407

@Vascom
Copy link
Contributor

Vascom commented Oct 3, 2017

I can't apply patch cleanly:

encfs ((v1.9.2))]$ patch -p1 -s --fuzz=0 --no-backup-if-mismatch <0001-Replace-linux-define-with-more-standard-__linux__.patch
1 out of 1 hunk FAILED -- saving rejects to file encfs/FileUtils.cpp.rej
1 out of 1 hunk FAILED -- saving rejects to file encfs/RawFileIO.cpp.rej
1 out of 1 hunk FAILED -- saving rejects to file encfs/encfs.cpp.rej

@benrubson
Copy link
Contributor

Use master ? Patches have been merged.

@rfjakob
Copy link
Collaborator

rfjakob commented Oct 3, 2017

I believe this is for the rpm package, master is not good enough

Have you seen why the patch does not apply?

@Vascom
Copy link
Contributor

Vascom commented Oct 3, 2017

I am use tag v1.9.2. I don't want use master for fedora package.
May be it's time to release 1.9.3 with bugfixes?

@benrubson
Copy link
Contributor

May be it's time to release 1.9.3 with bugfixes?

One or 2 things remaining before 1.9.3 :)

@Vascom
Copy link
Contributor

Vascom commented Oct 3, 2017

I am think this patch can't be appyed cleanly to v.1.9.2 because need previous patches for reported files.

@benrubson
Copy link
Contributor

Apply it manually, it's quite tiny and will be very easy to apply :)

@Vascom
Copy link
Contributor

Vascom commented Oct 3, 2017

Hm, OK :)

@mcmindcoder
Copy link

FYI This problem is still reproducible on some conditions. If I use '..' or '.' inside my path while mounting encfs, I still have Permission denied.
I my case I tried to use: cat /disk/key/keys/server_home/home_mount_password | ENCFS6_CONFIG=/disk/key/keys/server_home/_encfs6.xml /disk/script/encfs_1.9.4/encfs --public -o nonempty -S /disk/script/../home/ /home/ and it caused permission error. Then I used readlink -fm to absolute paths./disk/script/../home/ was changed to /disk/home/ and everything worked fine after that.

@benrubson
Copy link
Contributor

Where are the permission denied ? On every file ?
So the only thing you changed to make it work is /disk/script/../home/ to /disk/home/ in your command line, right ?
Certainly that "other" users are not allowed to go into your script dir, so can't resolve the full path.
But are allowed to go into your home dir, this is why the command with /disk/home/ works. Well this is my assumption.
Could you please verify ? Thx 👍

@mcmindcoder
Copy link

mcmindcoder commented Feb 13, 2018

Ben you are right. /disk/script is root owned and has 700 permission and it all makes sense now. It didn't occur to me initially though. Also I was able access files as root but not as other users. Thank you for quick response.

@Mamak2000
Copy link

Hello, I found out the issue in #403. I added a comment for it seems not to be working properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants