rasguanabana / ytfs

YouTube File System
MIT License
1.1k stars 45 forks source link

Traceback fusermount operation not permitted #5

Closed Profpatsch closed 9 years ago

Profpatsch commented 9 years ago
> ytfs -v yt
fusermount: mount failed: Operation not permitted
Traceback (most recent call last):
  File "/nix/store/msgclqxm75hm9qnjh852bc55psjs34pb-python3.4-ytfs-2015-7-7/bin/.ytfs-wrapped", line 618, in <module>
    main(x.mountpoint[0], av)
  File "/nix/store/msgclqxm75hm9qnjh852bc55psjs34pb-python3.4-ytfs-2015-7-7/bin/.ytfs-wrapped", line 601, in main
    FUSE(YTFS(av), mountpoint, foreground=False)
  File "/nix/store/xdj776snviig0lk3wmlk48dzqzhbn59x-python3.4-fusepy-2.0.2/lib/python3.4/site-packages/fuse.py", line 399, in __init__
    raise RuntimeError(err)
RuntimeError: 1

I tried sshfs, it runs fine.

rasguanabana commented 9 years ago

Do you have right permissions to the directory? Please give output of ls -ld yt.

Profpatsch commented 9 years ago
drwxr-xr-x 1 philip users    0 Jul  9 02:37 yt

Own user, rwx. Oh, maybe fuse runs in another user … Nope, changed to 777 and same error.

Do you write any files outside of the mountpoint folder or /tmp?

rasguanabana commented 9 years ago

Strange, given the fact that sshfs succeeds there shouldn't be any problem. First line indicates that it's rather a mount specific problem, no files are accessed from ytfs itself at startup.

Try running with strace to check on which file open it fails, e.g:

strace -f -e open ytfs yt 2>&1 | grep -v python
Profpatsch commented 9 years ago

Okay, we are getting closer:

…
[pid 28513] open("/nix/store/i0l0jjkk82wsqz9z5yhg35iy78bjq684-glibc-2.21/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 28513] open("/dev/fuse", O_RDWR)   = 3
[pid 28513] open("/etc/fuse.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 28513] open("/etc/mtab", O_RDONLY|O_CLOEXEC) = 5
fusermount: mount failed: Operation not permitted
[pid 28513] +++ exited with 1 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=28513, si_uid=1000, si_status=1, si_utime=0, si_stime=0} ---
Traceback (most recent call last):
    main(x.mountpoint[0], x.d)
    FUSE(YTFS(), mountpoint, foreground=debug)
    raise RuntimeError(err)
RuntimeError: 1
+++ exited with 1 +++

On nixOS, there is no /etc/fuse.conf. Do you need more of the log?

rasguanabana commented 9 years ago

I checked /etc/fuse.conf on my system, seems like its existence is irrelevant.

I'm running out of ideas. Please give output of ls -lwhich fusermount`, should have ~~sticky bit~~ setuid set. edit: Or your user needs to be infuse` group, if such group exists.

Profpatsch commented 9 years ago

Does have setuid set. There is no fuse group.

rasguanabana commented 9 years ago

Maybe we'll try strace again. Do strace -f ytfs yt 2> strace.log and post full strace.log somewhere. I'll take a closer look at it.

Profpatsch commented 9 years ago

Thanks for your help!

http://profpatsch.de/tmp/strace.log

rasguanabana commented 9 years ago

Huh, almost 18k lines :D I'll investigate tomorrow. In the meantime, create virtualenv and try installing ytfs from pip (I've just made a package) .