Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

sendmail: collect: Cannot write ... Permission denied-SOLVED

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
Moriah
Advocate
Advocate
User avatar
Posts: 2388
Joined: Sat Mar 27, 2004 3:11 am
Location: Kentucky
Contact:
Contact Moriah
Website

sendmail: collect: Cannot write ... Permission denied-SOLVED

  • Quote

Post by Moriah » Thu Jun 09, 2011 9:00 pm

I am getting errors when receiving email on a new server running sendmail. The log looks like:

Code: Select all

Jun  9 15:40:01 rcvbox sm-mta[31606]: p59Je0f0031606: SYSERR(root): collect: Cannot write ./dfp59Je0f0031606 (bfcommit, uid=0, gid=209): Permission denied
Jun  9 15:40:01 rcvbox sm-mta[31606]: p59Je0f0031606: from=<rj@sendingdomain.com>, size=576, class=0, nrcpts=1, proto=ESMTP, daemon=MTA, relay=xxxxxx-5.iglou.com [xxx.xxx.xxx.xxx]
and my /var/spool directory looks like:

Code: Select all

total 0
drwxr-xr-x  6 root  root   72 May 30 12:17 .
drwxr-xr-x 14 root  root  145 May  1 13:12 ..
-rw-r--r--  1 root  root    0 Apr 19 10:10 .keep
drwxrwx---  2 smmsp smmsp  58 Jun  7 14:56 clientmqueue
drwxr-x---  4 root  cron   70 Apr 27 00:33 cron
drwxrwxr-x  2 root  mail   38 Apr 27 00:32 mail
drwxr-xr-x  2 smmsp root   38 May 30 12:17 mqueue
I have another machine running sendmail just fine, but I can't figure out where the perm error lies. It would be nice if sendmail put the full path in the error message. :evil:

Can anybody help me with this? :?:
Last edited by Moriah on Sat Jul 09, 2011 4:47 am, edited 1 time in total.
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Top
jhardin
n00b
n00b
User avatar
Posts: 59
Joined: Wed Oct 12, 2005 3:00 am
Contact:
Contact jhardin
Website

  • Quote

Post by jhardin » Sat Jul 09, 2011 4:38 am

Try changing ownership of /var/spool/mqueue to root.
Top
Moriah
Advocate
Advocate
User avatar
Posts: 2388
Joined: Sat Mar 27, 2004 3:11 am
Location: Kentucky
Contact:
Contact Moriah
Website

  • Quote

Post by Moriah » Sat Jul 09, 2011 4:47 am

I'm sorry. I forgot about this stale post. I sloved this so long ago I don't even remember what the soloution was. :oops:
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Top
zeroeth
n00b
n00b
Posts: 1
Joined: Wed Jul 11, 2012 12:30 pm

  • Quote

Post by zeroeth » Wed Jul 11, 2012 12:34 pm

it looks like /var/spool/mqueue didn't have write permissions for the group

chmod g+w /var/spool/mqueue got rid of the permissions denied error for me
Top
lgt42
n00b
n00b
Posts: 1
Joined: Mon Jan 07, 2013 1:57 am
Contact:
Contact lgt42
Website

  • Quote

Post by lgt42 » Mon Jan 07, 2013 2:10 am

zeroeth wrote:it looks like /var/spool/mqueue didn't have write permissions for the group

chmod g+w /var/spool/mqueue got rid of the permissions denied error for me
Same thing for me with default installation of sendmail ( 8.14.4 as of today ), procmail, m4, fetchmail. It was necessary to exec the chmod g+w /var/spool/mqueue to get mail sent correctly.

Thanks and regards.
Top
seifn06
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 90
Joined: Sun Sep 19, 2004 5:39 am
Location: Lowell, Michigan

  • Quote

Post by seifn06 » Mon Dec 08, 2014 9:22 am

Thank you for this post. I ran into the same problem when installing sendmail-8.14.9 on a fresh Gentoo x86_64 installation.
Sendmail appeared to start OK, but refused incoming email messages.

Testing the installation with telnet yielded an error from sendmail:
421 4.3.0 collect: Cannot write ./dfsB89BR0e006242 (bfcommit, uid=0, gid=209): Permission denied

And I would see a message similar to the following in my server log:
Dec 8 04:11:59 an0l sm-mta[6242]: sB89BR0e006242: SYSERR(root): collect: Cannot write ./dfsB89BR0e006242 (bfcommit, uid=0, gid=209): Permission denied

I was able to send email (i.e. fixed the problem) after running:
# chmod g+w /var/spool/mqueue

Thanks again.
Top
Majed17
Guru
Guru
User avatar
Posts: 337
Joined: Wed Aug 31, 2011 12:31 pm
Location: Minsk, Belarus

  • Quote

Post by Majed17 » Wed Aug 12, 2015 11:36 am

ok setting the folder to root:root and running the command helped, i can now send email as root.
but when i su - nagios
and try

Code: Select all

/usr/sbin/sendmail "email address" Great test!
i get

Code: Select all

collect: Cannot write ./dft7CBUn9r030612 (bfcommit, uid=1000, gid=209): Permission denied
queueup: cannot create queue file ./qft7CBUn9r030612, euid=1000, fd=-1, fp=0x0: Permission denied
in /var/log/messages
i get:

Aug 12 14:30:52 nagios sendmail[30612]: t7CBUn9r030612: SYSERR(nagios): queueup: cannot create queue file ./qft7CBUn9r030612, euid=1000, fd=-1, fp=0x0: Permission denied

here is /etc/passwd

Code: Select all

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
adm:x:3:4:adm:/var/adm:/bin/false
lp:x:4:7:lp:/var/spool/lpd:/bin/false
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
news:x:9:13:news:/var/spool/news:/bin/false
uucp:x:10:14:uucp:/var/spool/uucp:/bin/false
operator:x:11:0:operator:/root:/bin/bash
portage:x:250:250:portage:/var/tmp/portage:/bin/false
nobody:x:65534:65534:nobody:/var/empty:/bin/false
sshd:x:22:22:added by portage for openssh:/var/empty:/sbin/nologin
man:x:13:15:added by portage for man-db:/usr/share/man:/sbin/nologin
cron:x:16:16:added by portage for cronbase:/var/spool/cron:/sbin/nologin
nullmail:x:88:88:added by portage for nullmailer:/var/nullmailer:/sbin/nologin
mysql:x:60:60:added by portage for mariadb:/dev/null:/sbin/nologin
apache:x:81:81:added by portage for apache:/var/www:/sbin/nologin
nagios:x:1000:209::/home/nagios:/bin/bash
mail:x:8:12:added by portage for mailbase:/var/spool/mail:/sbin/nologin
postmaster:x:14:246:added by portage for mailbase:/var/spool/mail:/sbin/nologin
smmsp:x:209:209:added by portage for sendmail:/var/spool/mqueue:/sbin/nologin
anybody knows how to solve it?
Top
Majed17
Guru
Guru
User avatar
Posts: 337
Joined: Wed Aug 31, 2011 12:31 pm
Location: Minsk, Belarus

  • Quote

Post by Majed17 » Wed Aug 12, 2015 12:00 pm

the problem was with the write permission for the folder:
/var/spool/clientmqueue
i set it to 770 and now it works, and thanks for the tip.
Top
Post Reply

8 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic