Bug 2825 - evolution can not send mail on cifs home directory
Summary: evolution can not send mail on cifs home directory
Status: RESOLVED FIXED
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 2.6
Hardware: x86 Linux
: P3 normal
Target Milestone: ---
Assignee: Steve French
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-25 12:27 UTC by Rene Tapia
Modified: 2005-08-21 18:02 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Tapia 2005-06-25 12:27:39 UTC
Hello,

I have been using cifs to mount user's home directories from a samba server for
a couple of months now. Everything has been great, except for a couple of apps,
that can not be used with cifs.

Client:
Debian 2.6.11
cifs-1.34
evolution 2.0.4

Server:
Debian 2.4.27-2
3.0.10-1

STEPS TO REPRODUCE:

1) Use cifs to mount a user's home directory with serverino option turned on
(evolution stores the .evolution directory in the home directory by default).

2) Configure evolution (SMTP server, etc) and send an email.

RESULT:
evolution can not send mail: "[Evolution Error] An error ocurred while 'Saving
messages in the folder' The message could not be added to the file mbox:
/home/username/.evolution/mail/local/Outbox: Permission denied."

EXPECTED:
Evolution to be able to send mail. This works fine with local home directory.
Comment 1 Steve French 2005-07-17 07:42:13 UTC
Have you tried with the mount option "mapchars" specified at mount time
(Evolution uses reserved characters in its temporary filenames which must be
remapped).
Comment 2 Rene Tapia 2005-07-18 13:13:08 UTC
I just tried the "mapchars" mount option but I am still getting the same error.
This is the pam_mount line I am using to mount home dirs:

volume * cifs debserv &   /home/&  uid=&,gid=&,serverino,mapchars - -
Comment 3 Dave Kleikamp 2005-08-09 09:07:56 UTC
I got the same result, and here's what looks relevant from strace:

31361 open("/home/shaggy/.evolution/mail/local/Outbox", O_RDWR <unfinished ...>
31361 <... open resumed> )              = 45
31361 fcntl64(45, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}
<unfinished ...>
31361 open("/home/shaggy/.evolution/mail/local/Outbox", O_WRONLY|O_APPEND
<unfinished ...>
31361 <... open resumed> )              = 47
31361 lseek(47, 0, SEEK_CUR)            = 0
31361 fcntl64(47, F_GETFL)              = 0x401 (flags O_WRONLY|O_APPEND)
31361 fcntl64(47, F_SETFL, O_WRONLY|O_NONBLOCK|O_APPEND) = 0
31361 write(47, "From shaggy@austin.ibm.com Tue A"..., 52) = -1 EACCES
(Permission denied)
31361 fcntl64(47, F_SETFL, O_WRONLY|O_APPEND) = 0
31361 close(47)                         = 0
31361 open("/home/shaggy/.evolution/mail/local/Outbox", O_WRONLY) = 46
31361 fcntl64(45, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
31361 close(45)                         = 0

I'm currently running 2.6.13-rc3
Comment 4 Dave Kleikamp 2005-08-09 11:09:44 UTC
Hmm.  Why does evolution lock the file using one file descriptor, and write to
it with another?  The problem seems to be that cifs enforces mandatory locks,
where local file systems only implement advisory locks.
Comment 5 Dave Kleikamp 2005-08-19 13:59:03 UTC
I'm currently testing a patch of Steve's that will disable sending byte-range
lock requests to the server.  I also noted that evolution can be built not to
lock mail files.  From evolution-data-server's configure script:

--enable-file-locking=fcntl/flock/no Enable support for locking mail files with
file locking

The no option would be the one you want.
Comment 6 Dave Kleikamp 2005-08-20 10:21:07 UTC
Steve, the mounting with the nobrl flag fixed the problem.
Comment 7 Steve French 2005-08-21 18:02:20 UTC
Will be fixed in 2.6.14.  Fixed in cifs development tree (1.36)