Fedora Linux Support Community & Resources Center
  #1  
Old 21st June 2005, 07:53 PM
jordanvanbergen Offline
Registered User
 
Join Date: Jun 2005
Posts: 9
Unhappy Cyrus-imapd problem(s) (different) after upgrading FC3 -> FC4

After upgrading FC3 to FC4 I have the following cyrus-imapd problems:

Jun 21 20:34:34 ns2 master[28770]: unable to create imap listener socket: Permission denied
Jun 21 20:34:34 ns2 master[28770]: unable to create imaps listener socket: Permission denied
Jun 21 20:34:34 ns2 master[28770]: unable to create pop3 listener socket: Permission denied
Jun 21 20:34:34 ns2 master[28770]: unable to create pop3s listener socket: Permission denied

See the total /var/log/maillog about /etc/init.d/cyrus-imapd restart

Jun 21 20:34:33 ns2 master[27598]: exiting on SIGTERM/SIGINT
Jun 21 20:34:34 ns2 master[28770]: process started
Jun 21 20:34:34 ns2 master[28772]: about to exec /usr/lib/cyrus-imapd/ctl_cyrusdb
Jun 21 20:34:34 ns2 ctl_cyrusdb[28772]: recovering cyrus databases
Jun 21 20:34:34 ns2 ctl_cyrusdb[28772]: skiplist: recovered /var/lib/imap/mailboxes.db (0 records, 144 bytes) in 0 seconds
Jun 21 20:34:34 ns2 ctl_cyrusdb[28772]: skiplist: recovered /var/lib/imap/annotations.db (0 records, 144 bytes) in 0 seconds
Jun 21 20:34:34 ns2 ctl_cyrusdb[28772]: done recovering cyrus databases
Jun 21 20:34:34 ns2 master[28773]: about to exec /usr/lib/cyrus-imapd/idled
Jun 21 20:34:34 ns2 master[28770]: unable to create imap listener socket: Permission denied
Jun 21 20:34:34 ns2 master[28770]: unable to create imaps listener socket: Permission denied
Jun 21 20:34:34 ns2 master[28770]: unable to create pop3 listener socket: Permission denied
Jun 21 20:34:34 ns2 master[28770]: unable to create pop3s listener socket: Permission denied
Jun 21 20:34:34 ns2 master[28770]: ready for work
Jun 21 20:34:34 ns2 master[28775]: about to exec /usr/lib/cyrus-imapd/ctl_cyrusdb
Jun 21 20:34:34 ns2 ctl_cyrusdb[28775]: checkpointing cyrus databases
Jun 21 20:34:34 ns2 master[28776]: about to exec /usr/lib/cyrus-imapd/lmtpd
Jun 21 20:34:34 ns2 ctl_cyrusdb[28775]: archiving database file: /var/lib/imap/annotations.db
Jun 21 20:34:34 ns2 ctl_cyrusdb[28775]: archiving log file: /var/lib/imap/db/log.0000000001
Jun 21 20:34:34 ns2 ctl_cyrusdb[28775]: archiving database file: /var/lib/imap/mailboxes.db
Jun 21 20:34:34 ns2 ctl_cyrusdb[28775]: archiving log file: /var/lib/imap/db/log.0000000001
Jun 21 20:34:34 ns2 ctl_cyrusdb[28775]: done checkpointing cyrus databases
Jun 21 20:34:34 ns2 master[28770]: process 28775 exited, status 0
Jun 21 20:34:34 ns2 lmtpunix[28776]: executed

I have used the following detailed explanation to get postfix / cyrus up and running (it did work for FC3):

http://www.cs.wcupa.edu/~rkline/Linux/email.html

everything is okay, until I come at the following stage:

# su — cyrus

The cyrus user doesn't have a "real" home directory. We just need to "go through" it to cyradm shell:
-bash-3.00$ /usr/lib/cyrus-imapd/cyradm localhost
IMAP Password: (it wants the password for the cyrus user)
localhost.localdomain> help

I don't get this, I'm getting:

# su - cyrus
-bash-3.00$ /usr/lib/cyrus-imapd/cyradm localhost
cyradm: cannot connect to server

Postfixe / Cyrus are running but as the maillog already told not able to create imap and pop3 listener socket. I though ...hey the portnumbers 110 and 143 are not in the firewall. I have added these applied the changes to the firewall but still the same problem.

Anyone an idea how to fix this problem in FC4? the thing that's bugging me is:

Jun 21 20:34:34 ns2 master[28770]: unable to create imap listener socket: Permission denied
Jun 21 20:34:34 ns2 master[28770]: unable to create imaps listener socket: Permission denied
Jun 21 20:34:34 ns2 master[28770]: unable to create pop3 listener socket: Permission denied
Jun 21 20:34:34 ns2 master[28770]: unable to create pop3s listener socket: Permission denied

Hope anyone has an idea

Regards

Jordan van Bergen
Reply With Quote
  #2  
Old 21st June 2005, 08:35 PM
jordanvanbergen Offline
Registered User
 
Join Date: Jun 2005
Posts: 9
I read this in /etc/cyrus.conf:

# UNIX sockets start with a slash and are put into /var/lib/imap/sockets
SERVICES {
# add or remove based on preferences
imap cmd="imapd" listen="imap" prefork=5
imaps cmd="imapd -s" listen="imaps" prefork=1
pop3 cmd="pop3d" listen="pop3" prefork=3
pop3s cmd="pop3d -s" listen="pop3s" prefork=1
sieve cmd="timsieved" listen="sieve" prefork=0

This is what's getting the "permission denied" problems

I tried the following as I presume it has to do with SELinux:

[root@gg imap]# cd /var/lib/imap/
[root@gg imap]# ls -all
total 148
drwxr-x--- 14 cyrus mail 4096 Jun 21 21:13 .
drwxr-xr-x 24 root root 4096 Jun 21 20:24 ..
-rw------- 1 cyrus mail 144 Jun 21 21:13 annotations.db
drwx------ 2 cyrus mail 4096 May 5 06:49 backup
-rw------- 1 cyrus mail 114 Jun 21 21:12 .bash_history
drwx------ 2 cyrus mail 4096 Jun 21 21:13 db
drwx------ 2 cyrus mail 4096 Jun 21 21:13 db.backup1
drwx------ 2 cyrus mail 4096 Jun 21 21:13 db.backup2
-rw------- 1 cyrus mail 8192 Jun 21 20:26 deliver.db
drwx------ 2 cyrus mail 4096 May 5 06:49 log
-rw------- 1 cyrus mail 144 Jun 21 21:13 mailboxes.db
drwx------ 2 cyrus mail 4096 May 5 06:49 msg
drwx------ 2 cyrus mail 4096 May 5 06:49 proc
drwx------ 2 cyrus mail 4096 May 5 06:49 quota
drwx------ 2 cyrus mail 4096 Jun 21 21:13 rpm
drwx------ 2 cyrus mail 4096 May 5 06:49 sieve
drwxr-x--- 2 cyrus mail 4096 Jun 21 21:13 socket
drwx------ 2 cyrus mail 4096 May 5 06:49 user
[root@gg imap]# ls -Z socket -all
total 28
drwxr-x--- 2 system_u:object_r:cyrus_var_lib_t cyrus mail 4096 Jun 21 21:13 .
drwxr-x--- 14 system_u:object_r:cyrus_var_lib_t cyrus mail 4096 Jun 21 21:13 ..
srwxrwxrwx 1 root:object_r:cyrus_var_lib_t cyrus mail 0 Jun 21 21:13 idle
srwxrwxrwx 1 root:object_r:cyrus_var_lib_t root root 0 Jun 21 21:13 lmtp
-rw------- 1 root:object_r:cyrus_var_lib_t cyrus mail 0 Jun 21 20:26 lmtpunix-0.lock
[root@gg imap]# cd socket/
[root@gg socket]# chown cyrus:mail lmtp
[root@gg socket]# cd ..
[root@gg imap]# ls -Z socket -all
total 28
drwxr-x--- 2 system_u:object_r:cyrus_var_lib_t cyrus mail 4096 Jun 21 21:13 .
drwxr-x--- 14 system_u:object_r:cyrus_var_lib_t cyrus mail 4096 Jun 21 21:13 ..
srwxrwxrwx 1 root:object_r:cyrus_var_lib_t cyrus mail 0 Jun 21 21:13 idle
srwxrwxrwx 1 root:object_r:cyrus_var_lib_t cyrus mail 0 Jun 21 21:13 lmtp
-rw------- 1 root:object_r:cyrus_var_lib_t cyrus mail 0 Jun 21 20:26 lmtpunix-0.lock

so I put lmtp directory to chown cyrus:mail as it was root and maybe that's why I get the "permission denied" problems. After restarting cyrus-imapd /etc/init.d/cyrus-imapd I went into the directory and did the following:

[root@gg socket]# /etc/init.d/cyrus-imapd restart
Shutting down cyrus-imapd: [ OK ]
Starting cyrus-imapd: preparing databases... done. [ OK ]
[root@gg socket]# ls -all
total 28
drwxr-x--- 2 cyrus mail 4096 Jun 21 21:32 .
drwxr-x--- 14 cyrus mail 4096 Jun 21 21:32 ..
srwxrwxrwx 1 cyrus mail 0 Jun 21 21:32 idle
srwxrwxrwx 1 root root 0 Jun 21 21:32 lmtp
-rw------- 1 cyrus mail 0 Jun 21 20:26 lmtpunix-0.lock

The lmtp directory is set to root:root again? Is this causing my permission denied problems.

Or is it something else.
Hope anyone has a comment or suggestion on this as my pop3 server is done for now ;-(

Regards,

Jordan
Reply With Quote
  #3  
Old 21st June 2005, 08:58 PM
jordanvanbergen Offline
Registered User
 
Join Date: Jun 2005
Posts: 9
I tried the following:

[root@gg usr]# ps -aux | grep cyrus
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.5/FAQ
cyrus 30310 0.0 0.1 4896 1328 ? Ss 21:32 0:00 /usr/lib/cyrus-imapd/cyrus-master -d
cyrus 30314 0.0 0.1 28724 1492 ? S 21:32 0:00 idled
cyrus 30316 0.0 0.2 29956 2124 ? S 21:32 0:00 lmtpd
root 30535 0.0 0.0 3752 684 pts/1 R+ 21:46 0:00 grep cyrus
[root@gg usr]# kill 30310
[root@gg usr]# cd /usr/lib/cyrus-imapd/
[root@gg cyrus-imapd]# cyrus-master &
[1] 30542
bash: cyrus-master: command not found
[root@gg cyrus-imapd]# ./cyrus-master &
[2] 30545
[1] Exit 127 cyrus-master
[root@gg cyrus-imapd]# ps -aux | grep cyrus
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.5/FAQ
cyrus 30545 0.0 0.1 4896 1300 pts/1 S 21:47 0:00 ./cyrus-master
cyrus 30548 0.0 0.1 28724 1492 pts/1 S 21:47 0:00 idled
cyrus 30550 0.0 0.1 30128 1924 pts/1 S 21:47 0:00 imapd
cyrus 30551 0.0 0.1 30124 1936 pts/1 S 21:47 0:00 imapd -s
cyrus 30552 0.0 0.1 29892 1924 pts/1 S 21:47 0:00 pop3d
cyrus 30553 0.0 0.1 29888 1920 pts/1 S 21:47 0:00 pop3d -s
cyrus 30554 0.0 0.2 29960 2124 pts/1 S 21:47 0:00 lmtpd
cyrus 30555 0.0 0.1 30128 1924 pts/1 S 21:47 0:00 imapd
cyrus 30556 0.0 0.1 30128 1928 pts/1 S 21:47 0:00 imapd -s
cyrus 30557 0.0 0.1 29888 1924 pts/1 S 21:47 0:00 pop3d
cyrus 30558 0.0 0.1 29892 1924 pts/1 S 21:47 0:00 pop3d -s
cyrus 30559 0.0 0.1 30124 1924 pts/1 S 21:47 0:00 imapd
cyrus 30560 0.0 0.1 30128 1924 pts/1 S 21:47 0:00 imapd
cyrus 30561 0.0 0.1 30128 1924 pts/1 S 21:47 0:00 imapd
cyrus 30562 0.0 0.1 30128 1924 pts/1 S 21:47 0:00 imapd
cyrus 30563 0.0 0.1 29892 1920 pts/1 S 21:47 0:00 pop3d
cyrus 30564 0.0 0.1 29892 1928 pts/1 S 21:47 0:00 pop3d
cyrus 30565 0.0 0.1 30128 1924 pts/1 S 21:47 0:00 imapd
cyrus 30566 0.0 0.1 30128 1928 pts/1 S 21:47 0:00 imapd
cyrus 30567 0.0 0.1 30124 1924 pts/1 S 21:47 0:00 imapd
cyrus 30568 0.0 0.1 30128 1928 pts/1 S 21:47 0:00 imapd
cyrus 30569 0.0 0.1 29888 1916 pts/1 S 21:47 0:00 pop3d
cyrus 30570 0.0 0.1 29888 1916 pts/1 S 21:47 0:00 pop3d
root 30572 0.0 0.0 3756 688 pts/1 R+ 21:47 0:00 grep cyrus
[root@gg cyrus-imapd]# su - cyrus
-bash-3.00$ /usr/lib/cyrus-imapd/cyradm localhost
IMAP Password:
Login failed: authentication failure at /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/Cyrus/IMAP/Admin.pm line 118
cyradm: cannot authenticate to server with as cyrus

SO SYMPTOMS AGAIN:

/etc/init.d/cyrus-imapd restart

will start up a process like: cyrus 30310 0.0 0.1 4896 1328 ? Ss 21:32 0:00 /usr/lib/cyrus-imapd/cyrus-master -d (watch the -d options)

If I kill this process and startyp cyrus-master myself doing:

[root@gg usr]# cd /usr/lib/cyrus-imapd/
[root@gg cyrus-imapd]# cyrus-master &

Cyrus is running, but I can't log in using my loginname and password, I'm getting:
Login failed: authentication failure at /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/Cyrus/IMAP/Admin.pm line 118
cyradm: cannot authenticate to server with as cyrus

Anyone an idea how I can make cyrus-imapd run without having to kill the cyrus-master -d process and starting it myself using cyrus-master & and how to make it possible for me to log in to cyradm?

Regards

Jordan van Bergen
Reply With Quote
  #4  
Old 22nd June 2005, 09:01 AM
jordanvanbergen Offline
Registered User
 
Join Date: Jun 2005
Posts: 9
Workaround fix....

I did this to get a workaround:

changed config of /etc/sysconfig/saslauthd
MECH=shadow changed to MECH=pam

restarted everything:

/etc/init.d/postfix restart
/etc/init.d/cyrus-admin restart
/etc/init.d/saslauthd restart

ps -aux | grep cyrus
cyrus 14121 0.0 0.1 4904 1292 ? Ss 09:58 0:00 /usr/lib/cyrus-imapd/cyrus-master -d

[root@gg sysconfig]# kill 14121
[root@gg sysconfig]# /usr/lib/cyrus-imapd/cyrus-master -d &
[1] 14134

Now everything is working. But of course if I reboot the machine cyrus won't be running. How can I make sure /usr/lib/cyrus-imapd/cyrus-master -d runs as it should do? Now I have to kill the cyrus-master process first and then startup it manually /usr/lib/cyrus-imapd/cyrus-master -d &

Anyone an idea on how to make cyrus-master work permanent when using /etc/init.d/cyrus-imapd restart ????

Regards
Jordan
Reply With Quote
  #5  
Old 25th June 2005, 10:06 PM
rexxe Offline
Registered User
 
Join Date: Jun 2005
Posts: 3
I have the same problem. It is definitely SELinux, as when I did setenforce 0 and then started up cyrus everything worked perfectly. I don't know the solution yet, but obviously we need to change the SELinux policy.
Reply With Quote
  #6  
Old 25th June 2005, 10:33 PM
jordanvanbergen Offline
Registered User
 
Join Date: Jun 2005
Posts: 9
I have disabled SELinux totally. If I know where to set "setenforce 0" I might be able to enable it again. How does this setenforce 0 work and where do I have to set it within the SELinux configuration?

Regards
Jordan
Reply With Quote
  #7  
Old 25th June 2005, 10:36 PM
rexxe Offline
Registered User
 
Join Date: Jun 2005
Posts: 3
I turned SELinux back on using (just type it at the command line) setenforce 1 and then typed: setsebool -P cyrus_disable_trans 1

Cyrus now works fine. Basically I think I just removed Cyrus as a targeted service by SELinux. SELinux has caused me such headaches.....It's a temporary solution for now I suppose, but at least it works.
Reply With Quote
Reply

Tags
>, cyrusimapd, fc3, fc4, problems, upgrading

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with cyrus-imapd in Fedora 10 Leo76 Using Fedora 0 8th July 2009 01:56 PM
cyrus-imapd -> /usr/lib/cyrus-imapd/cyrus-master -d permission denied problem jordanvanbergen Servers & Networking 2 22nd June 2005 03:36 PM


Current GMT-time: 19:52 (Friday, 19-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat