Ubuntu

sshfs : : Permission denied

Reported by pet on 2007-07-02
8
Affects Status Importance Assigned to Milestone
sshfs-fuse (Ubuntu)
Medium
Unassigned

Bug Description

sshfs : : Permission denied

as normal user i always get:

sshfs user@192.168.1.52: /home/user/otherlinux
fuse: failed to exec fusermount: Permission denied

if i change the permission for fusermount to user i get an other failure:
/dev/fuse : Permission denied

as root:
sudo sshfs user@192.168.1.52: /home/user/otherlinux
it is working, but thats not the way it should work.

my system: feisty fully upgraded
Linux nbxlinux4h8 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux

regards peter

Ethan Blanton (eblanton) wrote :

You will have to add yourself to the 'fuse' group before you can mount fuse filesystems (including sshfs). You can do this either through the "Users and Groups" utility, or by running 'sudo adduser <youruser> fuse' at a prompt. Once you have done this, log out and back in (sorry, that's a limitation of Unix groups), and sshfs should work for you.

Today i was playing around with encfs and to get encfs working it was necessary to do a "sudo addgroup user fuse"...and then after a while i found out that i have a connection with sshfs...but i was not knowing why...your answer explains now everything :-)

but anyway sshfs shoud work "out off the box". That make things simple for simple users like mine.

Thank you for your fast respond

regards Peter

Ethan Blanton <email address hidden> schrieb: You will have to add yourself to the 'fuse' group before you can mount
fuse filesystems (including sshfs). You can do this either through the
"Users and Groups" utility, or by running 'sudo adduser fuse'
at a prompt. Once you have done this, log out and back in (sorry,
that's a limitation of Unix groups), and sshfs should work for you.

--
sshfs : : Permission denied
https://bugs.launchpad.net/bugs/123501
You received this bug notification because you are a direct subscriber
of the bug.

---------------------------------
Yahoo! Clever: Frage stellen und einen von 44 iPods gewinnen

weeloo (weeloo-gmail) wrote :

I found that in 7.04, simply adding current user to fuse is not enough. the /dev/fuse default owner/group is root:root. So in short, after sshfs was installed, we need to perform the following steps in order to make it work.

1. add user to fuse group.

2. make sure /dev/fuse group belongs to fuse and group has r/w access.
(in 7.04, default for /dev/fuse is root:root rw- rw- ---)

3. logout, in order step 1 could take effect.

4. perform sshfs mount

I agree with peter that this whole process should be made easier. Or at least point out the extra steps users must perform.

DamianEads (damian-eads) wrote :

The user does not need to log out after adding themselves to the fuse group in order to invoke sshfs. Simply type 'newgrp fuse', which will change the user's current group to fuse. Then type 'id' to verify the current group id has been changed as requested. Now, you can try mounting a remote directory over SSH with sshfs.

Also, make sure you use 'fusermount -u mounting_point' instead of 'umount'. This avoids unnecessarily logging in as root when unmounting a virtual directory mounted with fuse.

To recap:

1. Add yourself to the fuse group by typing gnome-control-center, choosing Users and Groups, double clicking on the user to change in the user listing box, clicking on the User tab, then checking "fuse"

   Alternatively, you can use groupmems as root, but the groupmems command has been segfaulting for me, and I don't know why.

2. Change your current group id to fuse by typing

   newgrp fuse

3. Mount the remote directory over SSH using sshfs

   sshfs <email address hidden>:/remote/directory/to/mount /home/myusername/my-mounting-point

4. Viola! When your done, unmount using:

   fusermount -u /home/myusername/my-mounting-point

Damian

Ethan Blanton (eblanton) wrote :

(OT) Damian: Does newgrp actually work that way for you? It has never worked thus for me, but I wasn't sure at the time of your comment, so I did not reply. I had occasion to use newgrp yesterday, however, so I tried it without logout -- and got the same behavior I always have, which is that it cannot change my group to a group to which I did not belong at login time.

Sanjeewa (sanjeewasamarakkody) wrote :

You can use "sshfs -o allow_other user@192.168.1.52: /home/user/otherlinux"

Steven Harms (sharms) wrote :

Is this still an issue in Intrepid or Jaunty?

Changed in sshfs-fuse:
status: New → Incomplete
Ryan Thompson (rct86) wrote :

At a minimum, any fuse packages should trigger one of those little system-notification-area-lightbulb-info-popups that says "Remember to add yourself to the fuse group."

yea...I remebered that too but even then it does not work

peter

--- Darwin Award Winner <email address hidden> schrieb am Fr, 24.4.2009:

Von: Darwin Award Winner <email address hidden>
Betreff: [Bug 123501] Re: sshfs : : Permission denied
An: <email address hidden>
Datum: Freitag, 24. April 2009, 17:52

At a minimum, any fuse packages should trigger one of those little
system-notification-area-lightbulb-info-popups that says "Remember to
add yourself to the fuse group."

--
sshfs : : Permission denied
https://bugs.launchpad.net/bugs/123501
You received this bug notification because you are a direct subscriber
of the bug.

I'm using sshfs with Ubuntu 9.04 64 bit.

I'm successfully mounting the remote file system, but when I try to update a file on the mounted remote file system (with gedit), I get the attached permissions error saying I don't have permission to save the file (see attachment).

I'm mounting the remote file system with the root account on the remote server:
sshfs <email address hidden>:/var/www/website/htdocs/ /home/lonnie/remote/website/

Also, my username is a member of the "fuse" group.

By default, in 9.04, /dev/fuse has read and write permissions, so I'm not having the same issue mentioned earlier regarding 7.04.

If I ssh into this same remote server as root, and use nano to edit the file, I have no permission issues.

So, since I'm sshfs with root account of the remote server, and since my username is in the fuse group, why am I running into permission problems as I try to update files on the remote mounted file system with gedit?

After reading Damian Eads's post carefully, I noticed that I didn't execute this command:

newgrp fuse

After performing this command, I was able to save files on the remote file system.

Note: At one time, that step wasn't necessary for me, but not it is for some reason.

Why isn't adding my username to the fuse group enough anymore (it use to be)?

I think the key thing to take away from this bug report, is that the entire process should be simplified somehow. Most tutorials don't even mention this step. This will continue to cause confusion for people who don't see this thread. Can the process be simplified for future users?

Scratch that! I'm still having the same problem.

I thought it was saving, but what actually happened is that the mount got drop between the time I opened it and saved it. So when I saved it, after executed newgrp fuse, it saved the file to the mount point that was empty.

Any help would be appreciated.

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the latest development version of Ubuntu - Lucid Lynx. It won't be fixed in previous versions of Ubuntu because the package doesn't fit the requirements for backporting. See https://help.ubuntu.com/community/UbuntuBackports for more information.

I can now add the packages "sshfs" and "sshfs-utils" to Lucid, and use fuse without having to add myself to fuse group, log out, log in again, etc. The process appears to work much easier.

Changed in sshfs-fuse (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments