File locking on sshfs file system, possible?

Chris Green cl at isbd.net
Fri Oct 25 09:42:28 UTC 2019


On Fri, Oct 25, 2019 at 10:14:28AM +0100, Chris Green wrote:
> On Fri, Oct 25, 2019 at 08:58:06AM +0100, Chris Green wrote:
> > I just tried running mutt 'remotely' by mounting ~/.muttrc and my main
> > mail directory ~/Mail using sshfs and running a local copy of mutt.
> > This makes handling attachments and HTML E-Mail much faster and easier
> > than running mutt on the remote system via ssh.
> > 
> > However when I try and save E-Mails into the ~/Mail hierarchy it
> > complains that it can't lock the mbox file.  I guess that there's some
> > sort of incompatibility between mutt's default locking method and
> > sshfs. 
> > 
> > Is there anything I can do about this?  I.e. can I build mutt with a
> > different locking method (or more the point the dotlock program I
> > suppose) or am I basically stuck?  I know I could move to maildir but
> > I'd prefer not to really and that would likely slow things down across
> > an sshfs connection.
> > 
> A little more information:-
> 
>     I'm running mutt 1.10.1 on xubuntu 19.04 
> 
>     The actual error I'm seeing is "Couldn't lock /home/chris/Mail/folder/test"
>     (Obviously changes according to name of destination mbox)
> 
> So is it not a locking problem, rather a permission problem?  My UID
> on both systems is the same so files in the ~/Mail directory are all
> owned by me on both systems.
> 
Even more information!

mutt_dotlock is failing when I try and lock the file across the
sshfs file system:-

    chris at t470$ mutt_dotlock /home/chris/Mail/folder/test/fred
    chris at t470$ echo $?
    1
    chris at t470$ 

    (The folder Mail is an sshfs mount)

There is no permission problem for me to create files:-

    chris at t470$ ls -al /home/chris/Mail/folder/test
    total 8
    drwxrwxr-x 1 chris chris 4096 Oct 25 10:38 .
    drwxrwxr-x 1 chris chris 4096 Oct 25 10:35 ..
    -rw-rw-r-- 1 chris chris    0 Oct 25 10:25 fred
    chris at t470$ touch /home/chris/Mail/folder/test/fred.lock
    chris at t470$ ls -al /home/chris/Mail/folder/test
    total 8
    drwxrwxr-x 1 chris chris 4096 Oct 25 10:40 .
    drwxrwxr-x 1 chris chris 4096 Oct 25 10:35 ..
    -rw-rw-r-- 1 chris chris    0 Oct 25 10:25 fred
    -rw-rw-r-- 1 chris chris    0 Oct 25 10:40 fred.lock
`
So how do I diagnose what the actual error is?  Is mutt_dotlock trying
to run as 'mail' rather than 'chris'?

-- 
Chris Green


More information about the Mutt-users mailing list