Quantcast

Cannot umount as non-root user anymore

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Cannot umount as non-root user anymore

Bugzilla from realnc@gmail.com
I am not exactly sure when this started to happen (meaning which package
in my system was updated), but I am unable to umount FUSE filesystems as
a normal user.

In this case, I'm using NTFS-3G to mount an NTFS filesystem.  In my
fstab, I have:

   /dev/sdb1 /windows/D ntfs-3g
relatime,user,exec,norecover,windows_names,noauto 0 0

I can mount it as a normal, unprivileged user.  In the past, I could
also unmount it as non-root.  But not anymore.  Now, I get:

   $ umount /windows/D
   umount: /windows/D: umount failed: Operation not permitted

Other users (on the Gentoo Linux users list) report the exact same
problem with other FUSE filesystems, like sshfs.  It also only started
to happen recently for them as well; it was working fine in the past.

What's causing this?  This is a Gentoo Linux install (64-bit), using
kernel 3.5.4.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Miklos Szeredi
Nikos Chantziaras <[hidden email]> writes:

> I am not exactly sure when this started to happen (meaning which package
> in my system was updated), but I am unable to umount FUSE filesystems as
> a normal user.
>
> In this case, I'm using NTFS-3G to mount an NTFS filesystem.  In my
> fstab, I have:
>
>    /dev/sdb1 /windows/D ntfs-3g
> relatime,user,exec,norecover,windows_names,noauto 0 0
>
> I can mount it as a normal, unprivileged user.  In the past, I could
> also unmount it as non-root.  But not anymore.  Now, I get:
>
>    $ umount /windows/D
>    umount: /windows/D: umount failed: Operation not permitted
>
> Other users (on the Gentoo Linux users list) report the exact same
> problem with other FUSE filesystems, like sshfs.  It also only started
> to happen recently for them as well; it was working fine in the past.
>
> What's causing this?  This is a Gentoo Linux install (64-bit), using
> kernel 3.5.4.

I don't have Gentoo and so can't reproduce this.  It doesn't look like a
kernel problem.  Please check with the Gentoo fuse packager first.

Thanks,
Miklos

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Jean-Pierre André
In reply to this post by Bugzilla from realnc@gmail.com
Hi Nikos,

How is ntfs-3g configured ? on which kernel ?
Please post the outputs of :

uname -a
ntfs-3g -help 2>&1 | grep ration

Regards

Jean-Pierre

Nikos Chantziaras wrote:

> I am not exactly sure when this started to happen (meaning which package
> in my system was updated), but I am unable to umount FUSE filesystems as
> a normal user.
>
> In this case, I'm using NTFS-3G to mount an NTFS filesystem.  In my
> fstab, I have:
>
>     /dev/sdb1 /windows/D ntfs-3g
> relatime,user,exec,norecover,windows_names,noauto 0 0
>
> I can mount it as a normal, unprivileged user.  In the past, I could
> also unmount it as non-root.  But not anymore.  Now, I get:
>
>     $ umount /windows/D
>     umount: /windows/D: umount failed: Operation not permitted
>
> Other users (on the Gentoo Linux users list) report the exact same
> problem with other FUSE filesystems, like sshfs.  It also only started
> to happen recently for them as well; it was working fine in the past.
>
> What's causing this?  This is a Gentoo Linux install (64-bit), using
> kernel 3.5.4.
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> fuse-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/fuse-devel
>
>    

--
JP André
email [hidden email]



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Bugzilla from realnc@gmail.com
$ uname -a
Linux gentoo 3.5.4-gentoo #1 SMP PREEMPT Tue Sep 18 02:31:30 EEST 2012
x86_64 Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz GenuineIntel GNU/Linux


$ ntfs-3g -help 2>&1 | grep ration
ntfs-3g 2012.1.15 integrated FUSE 27 - Third Generation NTFS Driver
                 Configuration type 1, XATTRS are on, POSIX ACLS are off


On 19/09/12 09:27, Jean-Pierre André wrote:

> Hi Nikos,
>
> How is ntfs-3g configured ? on which kernel ?
> Please post the outputs of :
>
> uname -a
> ntfs-3g -help 2>&1 | grep ration
>
> Regards
>
> Jean-Pierre
>
> Nikos Chantziaras wrote:
>> I am not exactly sure when this started to happen (meaning which package
>> in my system was updated), but I am unable to umount FUSE filesystems as
>> a normal user.
>>
>> In this case, I'm using NTFS-3G to mount an NTFS filesystem.  In my
>> fstab, I have:
>>
>>      /dev/sdb1 /windows/D ntfs-3g
>> relatime,user,exec,norecover,windows_names,noauto 0 0
>>
>> I can mount it as a normal, unprivileged user.  In the past, I could
>> also unmount it as non-root.  But not anymore.  Now, I get:
>>
>>      $ umount /windows/D
>>      umount: /windows/D: umount failed: Operation not permitted
>>
>> Other users (on the Gentoo Linux users list) report the exact same
>> problem with other FUSE filesystems, like sshfs.  It also only started
>> to happen recently for them as well; it was working fine in the past.
>>
>> What's causing this?  This is a Gentoo Linux install (64-bit), using
>> kernel 3.5.4.



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Bugzilla from realnc@gmail.com
In reply to this post by Bugzilla from realnc@gmail.com
On 18/09/12 19:50, Nikos Chantziaras wrote:
> I am not exactly sure when this started to happen (meaning which package
> in my system was updated), but I am unable to umount FUSE filesystems as
> a normal user.
>[...]

A bit of additional data.  It didn't occur to me to also try fusermount
to unmount.  I now did that (with sshfs this time).  The error message is:

   $ fusermount -u ./mnt
   fusermount: entry for /home/realnc/mnt not found in /etc/mtab

However, mtab does have an entry:

   $ grep "/home/realnc/mnt" /etc/mtab
   foss: /home/realnc/mnt fuse.sshfs rw,nosuid,nodev 0 0


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Jean-Pierre André
Hi Nikos,

Nikos Chantziaras wrote:

> On 18/09/12 19:50, Nikos Chantziaras wrote:
>    
>> I am not exactly sure when this started to happen (meaning which package
>> in my system was updated), but I am unable to umount FUSE filesystems as
>> a normal user.
>> [...]
>>      
> A bit of additional data.  It didn't occur to me to also try fusermount
> to unmount.  I now did that (with sshfs this time).  The error message is:
>
>     $ fusermount -u ./mnt
>     fusermount: entry for /home/realnc/mnt not found in /etc/mtab
>
> However, mtab does have an entry:
>
>     $ grep "/home/realnc/mnt" /etc/mtab
>     foss: /home/realnc/mnt fuse.sshfs rw,nosuid,nodev 0 0

This looks like yet another circumstance where realpath()
does not return the expected canonical path.

In the ntfs-3g case, you must have in your system log
something like :
"Requested device xxxx canonicalized as yyyy"

with xxxx the designated device, and yyyy its real path.
yyyy is stored in /etc/mtab, useful for detecting the
double mounting of a device.

What are xxxx and yyyy in your case ?

Regards

Jean-Pierre


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Bugzilla from realnc@gmail.com
On 19/09/12 22:29, Jean-Pierre André wrote:

> Hi Nikos,
>
> Nikos Chantziaras wrote:
>>  [...]
>>      $ fusermount -u ./mnt
>>      fusermount: entry for /home/realnc/mnt not found in /etc/mtab
>>
>> However, mtab does have an entry:
>>
>>      $ grep "/home/realnc/mnt" /etc/mtab
>>      foss: /home/realnc/mnt fuse.sshfs rw,nosuid,nodev 0 0
>
> This looks like yet another circumstance where realpath()
> does not return the expected canonical path.
>
> In the ntfs-3g case, you must have in your system log
> something like :
> "Requested device xxxx canonicalized as yyyy"
>
> with xxxx the designated device, and yyyy its real path.
> yyyy is stored in /etc/mtab, useful for detecting the
> double mounting of a device.
>
> What are xxxx and yyyy in your case ?

I can't find any such messages in the logs:

   # grep -ri canonicalized /var/log

gives no results.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Feng Shuo-2
This might be a silly question but did you check the access mode of
/bin/fusermount?
I guess it should be 4755 but on most systems it' not.

On Thu, Sep 20, 2012 at 3:44 AM, Nikos Chantziaras <[hidden email]> wrote:

> On 19/09/12 22:29, Jean-Pierre André wrote:
> > Hi Nikos,
> >
> > Nikos Chantziaras wrote:
> >>  [...]
> >>      $ fusermount -u ./mnt
> >>      fusermount: entry for /home/realnc/mnt not found in /etc/mtab
> >>
> >> However, mtab does have an entry:
> >>
> >>      $ grep "/home/realnc/mnt" /etc/mtab
> >>      foss: /home/realnc/mnt fuse.sshfs rw,nosuid,nodev 0 0
> >
> > This looks like yet another circumstance where realpath()
> > does not return the expected canonical path.
> >
> > In the ntfs-3g case, you must have in your system log
> > something like :
> > "Requested device xxxx canonicalized as yyyy"
> >
> > with xxxx the designated device, and yyyy its real path.
> > yyyy is stored in /etc/mtab, useful for detecting the
> > double mounting of a device.
> >
> > What are xxxx and yyyy in your case ?
>
> I can't find any such messages in the logs:
>
>    # grep -ri canonicalized /var/log
>
> gives no results.
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> fuse-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/fuse-devel
>



--
Feng Shuo
Tel: (86)10-59851155-2116
Fax: (86)10-59851155-2008
Tianjin Zhongke Blue Whale Information Technologies Co., Ltd
10th Floor, Tower A, The GATE building, No. 19 Zhong-guan-cun Avenue
Haidian District, Beijing, China
Postcode 100080
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Bugzilla from realnc@gmail.com
It's 4711 (-rws--x--x).


On 20/09/12 08:50, Feng Shuo wrote:

> This might be a silly question but did you check the access mode of
> /bin/fusermount?
> I guess it should be 4755 but on most systems it' not.
>
> On Thu, Sep 20, 2012 at 3:44 AM, Nikos Chantziaras <[hidden email]> wrote:
>
>> On 19/09/12 22:29, Jean-Pierre André wrote:
>>> Hi Nikos,
>>>
>>> Nikos Chantziaras wrote:
>>>>   [...]
>>>>       $ fusermount -u ./mnt
>>>>       fusermount: entry for /home/realnc/mnt not found in /etc/mtab
>>>>
>>>> However, mtab does have an entry:
>>>>
>>>>       $ grep "/home/realnc/mnt" /etc/mtab
>>>>       foss: /home/realnc/mnt fuse.sshfs rw,nosuid,nodev 0 0
>>>
>>> This looks like yet another circumstance where realpath()
>>> does not return the expected canonical path.
>>>
>>> In the ntfs-3g case, you must have in your system log
>>> something like :
>>> "Requested device xxxx canonicalized as yyyy"
>>>
>>> with xxxx the designated device, and yyyy its real path.
>>> yyyy is stored in /etc/mtab, useful for detecting the
>>> double mounting of a device.
>>>
>>> What are xxxx and yyyy in your case ?
>>
>> I can't find any such messages in the logs:
>>
>>     # grep -ri canonicalized /var/log
>>
>> gives no results.



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Nikolaus Rath
In reply to this post by Bugzilla from realnc@gmail.com
Nikos Chantziaras <[hidden email]> writes:

> I am not exactly sure when this started to happen (meaning which package
> in my system was updated), but I am unable to umount FUSE filesystems as
> a normal user.
>
> In this case, I'm using NTFS-3G to mount an NTFS filesystem.  In my
> fstab, I have:
>
>    /dev/sdb1 /windows/D ntfs-3g
> relatime,user,exec,norecover,windows_names,noauto 0 0
>
> I can mount it as a normal, unprivileged user.  In the past, I could
> also unmount it as non-root.  But not anymore.  Now, I get:
>
>    $ umount /windows/D
>    umount: /windows/D: umount failed: Operation not permitted

Shouldn't this be "fusermount -u /windows/D"?


Best,

   -Nikolaus

--
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Bugzilla from realnc@gmail.com
On 20/09/12 12:28, Nikolaus Rath wrote:

> Nikos Chantziaras <[hidden email]> writes:
>> I am not exactly sure when this started to happen (meaning which package
>> in my system was updated), but I am unable to umount FUSE filesystems as
>> a normal user.
>>
>> In this case, I'm using NTFS-3G to mount an NTFS filesystem.  In my
>> fstab, I have:
>>
>>     /dev/sdb1 /windows/D ntfs-3g
>> relatime,user,exec,norecover,windows_names,noauto 0 0
>>
>> I can mount it as a normal, unprivileged user.  In the past, I could
>> also unmount it as non-root.  But not anymore.  Now, I get:
>>
>>     $ umount /windows/D
>>     umount: /windows/D: umount failed: Operation not permitted
>
> Shouldn't this be "fusermount -u /windows/D"?

It can be, but it's not needed.  umount is supposed to work fine.  I
mentioned it in another post anyway though.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Werner Baumann
In reply to this post by Bugzilla from realnc@gmail.com
Am Wed, 19 Sep 2012 21:45:36 +0300
schrieb Nikos Chantziaras <[hidden email]>:

> A bit of additional data.  It didn't occur to me to also try
> fusermount to unmount.  I now did that (with sshfs this time).  The
> error message is:
>
>    $ fusermount -u ./mnt
>    fusermount: entry for /home/realnc/mnt not found in /etc/mtab
>
> However, mtab does have an entry:
>
>    $ grep "/home/realnc/mnt" /etc/mtab
>    foss: /home/realnc/mnt fuse.sshfs rw,nosuid,nodev 0 0
>
This mtab-entry misses the option 'user=<username>'. The umount
programm will only allow an unpriveleged user to unmount when this
option is present in the mtab-entry. <username> must be that of the
user trying to unmount.
Though I don't know how fusermount handles this case.

Werner

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Bugzilla from realnc@gmail.com
On 20/09/12 20:42, Werner Baumann wrote:

> Am Wed, 19 Sep 2012 21:45:36 +0300
> schrieb Nikos Chantziaras <[hidden email]>:
>
>> A bit of additional data.  It didn't occur to me to also try
>> fusermount to unmount.  I now did that (with sshfs this time).  The
>> error message is:
>>
>>     $ fusermount -u ./mnt
>>     fusermount: entry for /home/realnc/mnt not found in /etc/mtab
>>
>> However, mtab does have an entry:
>>
>>     $ grep "/home/realnc/mnt" /etc/mtab
>>     foss: /home/realnc/mnt fuse.sshfs rw,nosuid,nodev 0 0
>>
> This mtab-entry misses the option 'user=<username>'. The umount
> programm will only allow an unpriveleged user to unmount when this
> option is present in the mtab-entry. <username> must be that of the
> user trying to unmount.

mtab is a automatically generated file.  What system component is
responsible for the "user=" option?


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Miklos Szeredi
Nikos Chantziaras <[hidden email]> writes:

> On 20/09/12 20:42, Werner Baumann wrote:
>> Am Wed, 19 Sep 2012 21:45:36 +0300
>> schrieb Nikos Chantziaras <[hidden email]>:
>>
>>> A bit of additional data.  It didn't occur to me to also try
>>> fusermount to unmount.  I now did that (with sshfs this time).  The
>>> error message is:
>>>
>>>     $ fusermount -u ./mnt
>>>     fusermount: entry for /home/realnc/mnt not found in /etc/mtab
>>>
>>> However, mtab does have an entry:
>>>
>>>     $ grep "/home/realnc/mnt" /etc/mtab
>>>     foss: /home/realnc/mnt fuse.sshfs rw,nosuid,nodev 0 0
>>>
>> This mtab-entry misses the option 'user=<username>'. The umount
>> programm will only allow an unpriveleged user to unmount when this
>> option is present in the mtab-entry. <username> must be that of the
>> user trying to unmount.
>
> mtab is a automatically generated file.  What system component is
> responsible for the "user=" option?

Fuse.

More specifically, libfuse will execute fusermount, which will add the
entry to /etc/mtab.  This is the code that does it:


| if (getuid() != 0) {
| const char *user = get_user_name();
| if (user == NULL)
| return -1;
|
| if (add_option(mnt_optsp, "user=", strlen(user)) == -1)
| return -1;
| strcat(*mnt_optsp, user);
| }
|

One possibility is that getuid() is now returning zero, but why that
would happen I have no idea.

Thanks,
Miklos



Thanks,
Miklos


>
>
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> fuse-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/fuse-devel

------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Bugzilla from realnc@gmail.com
On 21/09/12 18:41, Miklos Szeredi wrote:

> Nikos Chantziaras <[hidden email]> writes:
>>>>  [...]
>>>>      $ fusermount -u ./mnt
>>>>      fusermount: entry for /home/realnc/mnt not found in /etc/mtab
>>>>
>>>> However, mtab does have an entry:
>>>>
>>>>      $ grep "/home/realnc/mnt" /etc/mtab
>>>>      foss: /home/realnc/mnt fuse.sshfs rw,nosuid,nodev 0 0
>>>>
>>> This mtab-entry misses the option 'user=<username>'. [...]
>>
>> mtab is a automatically generated file.  What system component is
>> responsible for the "user=" option?
>
> Fuse.
>
> More specifically, libfuse will execute fusermount, which will add the
> entry to /etc/mtab.  This is the code that does it:
>
>
> | if (getuid() != 0) {
> | const char *user = get_user_name();
> | if (user == NULL)
> | return -1;
> |
> | if (add_option(mnt_optsp, "user=", strlen(user)) == -1)
> | return -1;
> | strcat(*mnt_optsp, user);
> | }
> |
>
> One possibility is that getuid() is now returning zero, but why that
> would happen I have no idea.

I inserted a fprintf() to stderr on the entry point as well as every
exit point in get_mnt_opts() to get some idea of what's happening, but I
see nothing printed on stderr.  It would seem that get_mnt_opts() isn't
even called once, so the error must be happening prior to that.

(Unless fuse does something funny with stderr and what gets printed
doesn't make it to the screen.)


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Miklos Szeredi
Nikos Chantziaras <[hidden email]> writes:

> On 21/09/12 18:41, Miklos Szeredi wrote:
>> Nikos Chantziaras <[hidden email]> writes:
>>>>>  [...]
>>>>>      $ fusermount -u ./mnt
>>>>>      fusermount: entry for /home/realnc/mnt not found in /etc/mtab
>>>>>
>>>>> However, mtab does have an entry:
>>>>>
>>>>>      $ grep "/home/realnc/mnt" /etc/mtab
>>>>>      foss: /home/realnc/mnt fuse.sshfs rw,nosuid,nodev 0 0
>>>>>
>>>> This mtab-entry misses the option 'user=<username>'. [...]
>>>
>>> mtab is a automatically generated file.  What system component is
>>> responsible for the "user=" option?
>>
>> Fuse.
>>
>> More specifically, libfuse will execute fusermount, which will add the
>> entry to /etc/mtab.  This is the code that does it:
>>
>>
>> | if (getuid() != 0) {
>> | const char *user = get_user_name();
>> | if (user == NULL)
>> | return -1;
>> |
>> | if (add_option(mnt_optsp, "user=", strlen(user)) == -1)
>> | return -1;
>> | strcat(*mnt_optsp, user);
>> | }
>> |
>>
>> One possibility is that getuid() is now returning zero, but why that
>> would happen I have no idea.
>
> I inserted a fprintf() to stderr on the entry point as well as every
> exit point in get_mnt_opts() to get some idea of what's happening, but I
> see nothing printed on stderr.  It would seem that get_mnt_opts() isn't
> even called once, so the error must be happening prior to that.
>
> (Unless fuse does something funny with stderr and what gets printed
> doesn't make it to the screen.)

Instead of fprintf you should do the following.  Add a sleep(10) to the
very begginging of main() in fusermount.  Compile, copy, chmod.  Then
start sshfs or any other fuse filesystem and on a different terminal do

  sudo strace -p `pidof fusermount` -f -o /tmp/strace

Thanks,
Miklos

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Bugzilla from realnc@gmail.com
On 24/09/12 14:09, Miklos Szeredi wrote:
> sudo strace -p `pidof fusermount` -f -o /tmp/strace

Here is the result:

http://pastebin.com/raw.php?i=smNswej6


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Miklos Szeredi
Nikos Chantziaras <[hidden email]> writes:

> On 24/09/12 14:09, Miklos Szeredi wrote:
>> sudo strace -p `pidof fusermount` -f -o /tmp/strace
>
> Here is the result:
>
> http://pastebin.com/raw.php?i=smNswej6

Okay, thanks.

Looks like an util-linux issue.  Looking further it is probably commit
e90e7401 "libmount: don't use nosuid,noexec,nodev for cifs user=foo"
that broke it.  It is in v2.22.

And it appears that a fix is alreay in git (not yet released):

commit 4be900c51d371a7a41495e4eca2d29fc77c20c7c
Author: Karel Zak <[hidden email]>
Date:   Wed Sep 12 14:27:12 2012 +0200

    libmount: don't remove user= when executed by root
   
    The original mount(8) allows to store arbitrary user= option to mtab
    file if called by root user. For example:
   
      # mount -f foo /bar -t xxx -o rw,user=kzak
   
    the new mount removes the 'user=' and 'users' options at all for root
    user. This is regression. The original functionality is necessary by
    'sshfs' where fuse writes to mtab file by mount(8).
   
    Reported-by: Juergen Daubert <[hidden email]> (and 'horrorStruck' on IRC)
    Signed-off-by: Karel Zak <[hidden email]>

So please test util-linux from git.

Thanks,
Miklos

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot umount as non-root user anymore

Bugzilla from realnc@gmail.com
On 24/09/12 17:54, Miklos Szeredi wrote:

> Nikos Chantziaras <[hidden email]> writes:
>
>> On 24/09/12 14:09, Miklos Szeredi wrote:
>>> sudo strace -p `pidof fusermount` -f -o /tmp/strace
>>
>> Here is the result:
>>
>> http://pastebin.com/raw.php?i=smNswej6
>
> Okay, thanks.
>
> Looks like an util-linux issue.  Looking further it is probably commit
> e90e7401 "libmount: don't use nosuid,noexec,nodev for cifs user=foo"
> that broke it.  It is in v2.22.
>
> And it appears that a fix is alreay in git (not yet released):
>
> commit 4be900c51d371a7a41495e4eca2d29fc77c20c7c
>[...]
> So please test util-linux from git.

I simply applied that patch on top of Gentoo's 2.22 package.  It solved
the issue with NTFS-3G; I can "umount" as normal user.  And with sshfs,
"fusermount -u" works now too.  (I don't think that "umount" is supposed
to work with sshfs.)

Thank you very much for tracking it down :-)


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Loading...