Odd behavior for fuse-device on tmpfs?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Odd behavior for fuse-device on tmpfs?

Christian Magnusson

I have compiled fuse-2.3.0 for the OpenWRT distribution to WRT54GS
router with a mips processor.

The rom-filesystem doesn't originally contain any /dev/fuse device, so
I hoped that the temporary device /tmp/.fuse_devXXXXXXX/fuse whould be
created and used, but it doesn't work.
The rom-filesystem contain kernel-2.4.30 and uClibc-0.9.27.

I have removed the unlink() and rmdir() commands in fusermount.c to see
the files after everything fails.
open() fails and I have also tried to change umask and chmod(777) to
both directories and character device without any success.
I have tried fopen() too, and it fails too.
When I do a stat("/tmp/.fuse_devXXXXXX/fuse") it returns ok, and give me
the correct file permissions, so why isn't it possible to open the
device?

It really looks like the problem Paul Alfille mailed about a week ago.
Is there any problem with having /tmp mounted as a tmpfs or something?
When I move the character device /tmp/.fuse_devXXXXXX/fuse to /etc/fuse
it doesn't give me the error "permission deenied"

(I have only run the applications as root.)

/Christian



root@OpenWrt:/# uname -a
Linux OpenWrt 2.4.30 #1 Mon Jul 18 17:43:36 EDT 2005 mips unknown
root@OpenWrt:/# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / jffs2 rw 0 0
none /dev devfs rw 0 0
none /proc proc rw 0 0
none /tmp tmpfs rw,nosuid,nodev 0 0
none /dev/pts devpts rw 0 0
root@OpenWrt:/# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root                 7296      2672      4624  37% /
none                     15292        16     15276   0% /tmp
root@OpenWrt:/# /etc/init.d/S80owfs start
try_open_new_temp: mkdtemp ok [/tmp/.fuse_devXs3Kok]
try_open_new_temp: chmod ok [/tmp/.fuse_devXs3Kok]
try_open_new_temp: mknod ok [/tmp/.fuse_devXs3Kok/fuse] perm=20666
fusermount: failed to open /tmp/.fuse_devXs3Kok/fuse: Permission denied
fopen(/tmp/.fuse_devXs3Kok/fuse) failed [Permission denied]
try_open_new_temp: fd=-1
open_fuse_device: try_open_fuse_device() ret=-1
Using /lib/modules/2.4.30/fuse.o
insmod: A module named fuse already exists
try_open_new_temp: mkdtemp ok [/tmp/.fuse_devmWxFgo]
try_open_new_temp: chmod ok [/tmp/.fuse_devmWxFgo]
try_open_new_temp: mknod ok [/tmp/.fuse_devmWxFgo/fuse] perm=20666
fusermount: failed to open /tmp/.fuse_devmWxFgo/fuse: Permission denied
fopen(/tmp/.fuse_devmWxFgo/fuse) failed [Permission denied]
try_open_new_temp: fd=-1
open_fuse_device: 2 try_open_fuse_device() ret=-1
fusermount: fuse device not found, try 'modprobe fuse' first

root@OpenWrt:/# ls -la /tmp/.fuse_devXs3Kok/fuse
crw-rw-rw-    1 root     root      10, 229 Aug 23 18:15
/tmp/.fuse_devXs3Kok/fuse
root@OpenWrt:/# ls -la /tmp/
drwxrwxrwt    9 root     root          200 Aug 23 18:15 .
drwxr-xr-x    1 root     root            0 Aug 23 07:33 ..
drwxrwxrwx    2 root     root           60 Aug 23 18:15 .fuse_devECjaRT
drwxrwxrwx    2 root     root           60 Aug 23 18:15 .fuse_devKO2i8a
drwxrwxrwx    2 root     root           60 Aug 23 18:15 .fuse_devXs3Kok
drwxrwxrwx    2 root     root           60 Aug 23 18:15 .fuse_devmWxFgo
drwxr-xr-x    2 root     root           40 Aug 23 18:15 1wire
drwxr-xr-x    2 root     root           80 Jan  1  2000 log
-rw-r--r--    1 root     root           40 Jan  1  2000 resolv.conf
drwxr-xr-x    2 root     root          140 Aug 23 18:15 run

root@OpenWrt:/# ls -l /dev/misc/fuse
crw-r-----    1 root     root      10, 229 Jan  1  1970 /dev/misc/fuse

root@OpenWrt:/# cat  /dev/misc/fuse
cat: Read error: Operation not permitted
root@OpenWrt:/# cat /tmp/.fuse_devXs3Kok/fuse
cat: /tmp/.fuse_devXs3Kok/fuse: Permission denied

root@OpenWrt:/# mv /tmp/.fuse_devXs3Kok/fuse /etc/fuse
root@OpenWrt:/# ls -l /etc/fuse
crw-rw-rw-    1 root     root      10, 229 Aug 23 18:15 /etc/fuse
root@OpenWrt:/# cat /etc/fuse
cat: Read error: Operation not permitted


root@OpenWrt:/# ls -l /usr/bin/fusermount
-rwsr-xr-x    1 root     root        21123 Aug 23 16:21
/usr/bin/fusermount





-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel