You are not logged in.
Hi,
Looking for a backup and synchronization solution, I finally chose unison + encfs + sshfs. While there was no problem testing sshfs or encfs independently, mounting an sshfs directory with encfs as a normal user resulted in an inaccessible directory, Mounting both sshfs and encfs directories as root worked, though.
How could I make the operations work with a normal user ? (that's the purpose of fuse btw)
As root, everything works as expected:
# mkdir sshfs-mountpoint
# mkdir encfs-mountpoint
# ls -l
total 8
drwxr-xr-x 2 root root 4096 Apr 11 22:32 encfs-mountpoint
drwxr-xr-x 2 root root 4096 Apr 11 22:32 sshfs-mountpoint
# sshfs username@host: /home/username/sshfs-mountpoint/
# ls sshfs-mountpoint/
encrypted
# ls -l
total 8
drwxr-xr-x 2 root root 4096 Apr 11 22:32 encfs-mountpoint
drwx------ 1 19734 root 4096 Apr 11 19:05 sshfs-mountpoint
# encfs /home/username/sshfs-mountpoint/encrypted/ /home/username/encfs-mountpoint/
EncFS Password:
# ls encfs-mountpoint/
test-file
# ls -l
total 8
drwx------ 1 19734 1000 4096 Apr 11 19:06 encfs-mountpoint
drwx------ 1 19734 root 4096 Apr 11 19:05 sshfs-mountpoint
As a normal user:
$ mkdir sshfs-mountpoint
$ mkdir encfs-mountpoint
$ ls -l
total 8
drwxr-xr-x 2 username users 4096 Apr 11 22:38 encfs-mountpoint
drwxr-xr-x 2 username users 4096 Apr 11 22:37 sshfs-mountpoint
$ sshfs username@host: /home/username/sshfs-mountpoint/
$ ls sshfs-mountpoint/
encrypted
$ ls -l
total 8
drwxr-xr-x 2 username users 4096 Apr 11 22:38 encfs-mountpoint
drwx------ 1 19734 root 4096 Apr 11 19:05 sshfs-mountpoint
$ touch sshfs-mountpoint/test
$ ls sshfs-mountpoint/
encrypted test
$ encfs /home/username/sshfs-mountpoint/encrypted/ /home/username/encfs-mountpoint/
EncFS Password:
$ ls encfs-mountpoint/
ls: cannot open directory encfs-mountpoint/: Permission denied
$ su
Password:
# ls encfs-mountpoint
ls: cannot access encfs-mountpoint: Permission denied
$ ls -l
total 8
drwx------ 1 19734 1000 4096 Apr 11 19:06 encfs-mountpoint
drwx------ 1 19734 root 4096 Apr 11 22:41 sshfs-mountpoint
Packages versions:
kernel26 2.6.29.1-3
udev 141-1
fuse 2.7.4-1
sshfs 2.2-1
encfs 1.5-3
This is a fresh install, with the default permissions for /dev/fuse:
$ ls -l /dev/fuse
crw-rw-rw- 1 root root 10, 229 Apr 9 11:35 /dev/fuse
Last edited by melyadon (2009-04-13 12:59:15)
Offline
I guess I hadn't enough STFW.
Solved by using:
$ sshfs -ouid=$MY_UID,gid=$MY_GID username@host: /home/username/sshfs-mountpoint/
instead of:
$ sshfs username@host: /home/username/sshfs-mountpoint/
Offline