permissions altered while saving over sshfs mount

Bug #151701 reported by Nthalk
4
Affects Status Importance Assigned to Milestone
gedit (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: gedit

gEdit alters permissions when saving a file over sshfs.

Kate and Quanta both do not do this.

1. sshfs -o uid=1000,gid=1000 myhost.com: /media/mymount

2. $ls -l /media/mymount/ | grep myfile
-rwxrwx--- 1 me me 7912 2007-10-11 13:37 myfile

3. gedit /media/mymount/myfile

4. Edit the file.

5. Save

6. $ls -l /media/mymount/ | grep myfile
-rw------- 1 me me 44275 2007-10-11 13:40 myfile

Notes:

I tried mounting the sshfs folder with umask=007, and the same thing happened.
I tried making a brand new file after mounting the folder, and that file's permissions stayed ug+rw.

It's only when opening a previously existing file on the mount that the permissions somehow are modified with ga-rw.

This was reported on GUTSY, with the package gedit_2.20.1-0ubuntu3_i386

Revision history for this message
Daniel Hahler (blueyed) wrote :

This has been reported for "regular" files, too - independent from sshfs (bug 152638).
Can you confirm this?

Changed in gedit:
status: New → Incomplete
Revision history for this message
Nthalk (phocis) wrote : Re: [Bug 151701] Re: permissions altered while saving over sshfs mount

Negative. This only applies to sshfs mounted files for me.

Tested it using the following commands:

$touch afile
$chmod uga-rwx afile
$chmod ug+rw afile
$gedit afile&
$watch ls -l

when alter the file and save, the permissions are not changed.

On 10/15/07, dAniel hAhler <email address hidden> wrote:
>
> This has been reported for "regular" files, too - independent from sshfs
> (bug 152638).
> Can you confirm this?
>
> ** Changed in: gedit (Ubuntu)
> Status: New => Incomplete
>
> --
> permissions altered while saving over sshfs mount
> https://bugs.launchpad.net/bugs/151701
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Daniel Hahler (blueyed)
description: updated
Revision history for this message
Daniel Hahler (blueyed) wrote :

Ok. These are two different bugs then.

I've tried reproducing your bug, but could not:
$ mkdir mymount
$ sshfs -o uid=1000,gid=1000 example.com: mymount
$ ls -l | grep myfile
-rw-rw-r-- 1 daniel daniel 51 2006-06-13 14:38 myfile
$ gedit myfile
$ ls -l | grep myfile
-rw-rw-r-- 1 daniel daniel 52 2007-10-16 02:10 myfile
-rw-rw-r-- 1 daniel daniel 51 2006-06-13 14:38 myfile~

So, in this case "ga-rw" has not been removed.

Your guess in the direction of "umask" may be quite right. E.g., if gedit confuses local and remote umask maybe.
I have umask=0022 locally and umask=0002 when logged in with ssh on the server.

I've first tried it with a new file, but have read then that it is only buggy for you with an already existing file and then tried that.

Revision history for this message
Daniel Hahler (blueyed) wrote :

hmm.. I wasn't able to "mv myfile~ myfile" on the sshfs: Operation not permitted
But I could "rm myfile" and then "mv myfile~ myfile". Strange!?

$ sshfs --version
SSHFS version 1.7
FUSE library version: 2.7.0
fusermount version: 2.7.0
using FUSE kernel interface version 7.8

Revision history for this message
Nthalk (phocis) wrote :

Daniel,

I have the exact version information that you do.

Also, if you own a directory, you may delete files out of it, but not modify
files that you do not own in it, I believe.

I haven't been able to update any packages, as I am working in a
professional environment and I have been burned by updates in the past
("Sure, boss, I'll get right on it after I find a CD to burn my wireless
module sources to").

But as soon as this weekend comes, I'll update everything and retry this
issue.

On 10/15/07, dAniel hAhler <email address hidden> wrote:
>
> Ok. These are two different bugs then.
>
> I've tried reproducing your bug, but could not:
> $ mkdir mymount
> $ sshfs -o uid=1000,gid=1000 example.com: mymount
> $ ls -l | grep myfile
> -rw-rw-r-- 1 daniel daniel 51 2006-06-13 14:38 myfile
> $ gedit myfile
> $ ls -l | grep myfile
> -rw-rw-r-- 1 daniel daniel 52 2007-10-16 02:10 myfile
> -rw-rw-r-- 1 daniel daniel 51 2006-06-13 14:38 myfile~
>
> So, in this case "ga-rw" has not been removed.
>
> Your guess in the direction of "umask" may be quite right. E.g., if gedit
> confuses local and remote umask maybe.
> I have umask=0022 locally and umask=0002 when logged in with ssh on the
> server.
>
> I've first tried it with a new file, but have read then that it is only
> buggy for you with an already existing file and then tried that.
>
> --
> permissions altered while saving over sshfs mount
> https://bugs.launchpad.net/bugs/151701
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Nthalk (phocis) wrote :

This problem is still not fixed. Is there any information that I can
provide? Everything I edit over a ssh mount turns to this: -rw-------....

Other reports of this:
http://<email address hidden>/msg391915.html
http://www.nabble.com/Permissions-problem-t4578034.html

-Carl

On 10/16/07, Carl Taylor <email address hidden> wrote:
>
> Daniel,
>
> I have the exact version information that you do.
>
> Also, if you own a directory, you may delete files out of it, but not
> modify files that you do not own in it, I believe.
>
> I haven't been able to update any packages, as I am working in a
> professional environment and I have been burned by updates in the past
> ("Sure, boss, I'll get right on it after I find a CD to burn my wireless
> module sources to").
>
> But as soon as this weekend comes, I'll update everything and retry this
> issue.
>
> On 10/15/07, dAniel hAhler < <email address hidden>> wrote:
> >
> > Ok. These are two different bugs then.
> >
> > I've tried reproducing your bug, but could not:
> > $ mkdir mymount
> > $ sshfs -o uid=1000,gid=1000 example.com: mymount
> > $ ls -l | grep myfile
> > -rw-rw-r-- 1 daniel daniel 51 2006-06-13 14:38 myfile
> > $ gedit myfile
> > $ ls -l | grep myfile
> > -rw-rw-r-- 1 daniel daniel 52 2007-10-16 02:10 myfile
> > -rw-rw-r-- 1 daniel daniel 51 2006-06-13 14:38 myfile~
> >
> > So, in this case "ga-rw" has not been removed.
> >
> > Your guess in the direction of "umask" may be quite right. E.g., if
> > gedit confuses local and remote umask maybe.
> > I have umask=0022 locally and umask=0002 when logged in with ssh on the
> > server.
> >
> > I've first tried it with a new file, but have read then that it is only
> > buggy for you with an already existing file and then tried that.
> >
> > --
> > permissions altered while saving over sshfs mount
> > https://bugs.launchpad.net/bugs/151701
> > You received this bug notification because you are a direct subscriber
> > of the bug.
> >
>
>

Revision history for this message
Daniel Hahler (blueyed) wrote :

The other reports you are referring to are not sshfs related and already reported in bug 152638.
The point with bug 152638 however is, that the file is not owned by the user who edits it. Only then, the permissions and owner/groups get changed.

Revision history for this message
Daniel Hahler (blueyed) wrote :

I've uploaded a version of gedit with the patch for bug 152638 to my PPA.
You can download it at http://ppa.launchpad.net/blueyed/ubuntu/pool/main/g/gedit/ and manually install it.
It may fix this bug, too.
Please test it and report back.

Revision history for this message
Nthalk (phocis) wrote :

Fantastic! It worked!

Thank you very much!

On 10/20/07, dAniel hAhler <email address hidden> wrote:
>
> I've uploaded a version of gedit with the patch for bug 152638 to my PPA.
> You can download it at
> http://ppa.launchpad.net/blueyed/ubuntu/pool/main/g/gedit/ and manually
> install it.
> It may fix this bug, too.
> Please test it and report back.
>
> --
> permissions altered while saving over sshfs mount
> https://bugs.launchpad.net/bugs/151701
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Daniel Hahler (blueyed) wrote :

Great! I'm marking it as duplicate then.

Changed in gedit:
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.