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.
Have you tried with the mount option "mapchars" specified at mount time (Evolution uses reserved characters in its temporary filenames which must be remapped).
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 - -
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
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.
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.
Steve, the mounting with the nobrl flag fixed the problem.
Will be fixed in 2.6.14. Fixed in cifs development tree (1.36)