scan_dir_push: open directory defer: Permission denied

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

scan_dir_push: open directory defer: Permission denied

DecebalICT
I went from an openSUSE system to a Debian 9 system.

I tried to copy and adapt my old config for the new system.

When running:
    postfix check
I get:
    postsuper: fatal: scan_dir_push: open directory defer: Permission denied

What could be the problem?

I already tried:
    postfix -c /etc/postfix set-permissions

But that did not solve the problem.


I tried:
    postfix -vvvv start

That gives:
    postfix: dict_lookup: html_directory = (notfound)
    postfix: mac_parse: /usr/share/doc/postfix/html
    postfix: dict_eval: const  /usr/share/doc/postfix/html
    postfix: dict_update: html_directory = /usr/share/doc/postfix/html
    postsuper: fatal: scan_dir_push: open directory defer: Permission denied
    postfix/postfix-script: fatal: Postfix integrity check failed!

I saw that /usr/share/doc/postfix/html did not exist, so I created it:
    drwxr-xr-x 2 postfix root 4.0K May 23 10:48 html

But I still get the same error. What could be happening here?
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

Wietse Venema
DecebalICT:

> I went from an openSUSE system to a Debian 9 system.
>
> I tried to copy and adapt my old config for the new system.
>
> When running:
>     postfix check
> I get:
>     postsuper: fatal: scan_dir_push: open directory defer: Permission denied
>
> What could be the problem?

1) You have a messed-up file system. Bring the system into single
user mode, unmount the file systems, run fsck.foo (foo depends on
file system type).

2) You have messed-up SeLinux permissions or labels. For a quick
check, turn off SeLinux and see if Postfix works better. Then fix
SeLinux or leave it off.

3) You have messed up AppArmor permissions, or some other 'security'
software. Same procedure.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

DecebalICT
2017-05-23 12:46 GMT+02:00 Wietse Venema <[hidden email]>:
DecebalICT:
> I went from an openSUSE system to a Debian 9 system.
>
> I tried to copy and adapt my old config for the new system.
>
> When running:
>     postfix check
> I get:
>     postsuper: fatal: scan_dir_push: open directory defer: Permission denied
>
> What could be the problem?

1) You have a messed-up file system. Bring the system into single
user mode, unmount the file systems, run fsck.foo (foo depends on
file system type).

​That seems strange: I just installed it. But you never know. I could try that. Only problem is that
    /usr/share/doc/postfix/html​
 
​is on /.

But I find a way around it.

By the way on my new system I use LVM and I did not on the old system. Could that be the problem?

2) You have messed-up SeLinux permissions or labels. For a quick
check, turn off SeLinux and see if Postfix works better. Then fix
SeLinux or leave it off.

3) You have messed up AppArmor permissions, or some other 'security'
software. Same procedure.

​Both are not installed.​

--
Cecil Westerhof
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

Wietse Venema
The opendir() call fails, because the kernel returns a 'Permission
denied' (EACCES) error condition.

Check the permissions of

/
/var
/var/spool
/var/spool/postfix
/var/spool/postfix/defer

Except for the last directory, all above directories must have
read and execute permission for everyone.

drwxr-xr-x  23 root     wheel  512 May 17  2016 /
drwxr-xr-x  25 root     wheel  512 Mar  2  2016 /var
drwxr-xr-x   9 root     wheel  512 May  1  2011 /var/spool
drwxr-xr-x  19 root     wheel  512 Dec 25  2013 /var/spool/postfix
drwx------  18 postfix  wheel  512 Aug 18  2011 /var/spool/postfix/defer

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

DecebalICT
2017-05-23 13:38 GMT+02:00 Wietse Venema <[hidden email]>:
The opendir() call fails, because the kernel returns a 'Permission
denied' (EACCES) error condition.

Check the permissions of

/
/var
/var/spool
/var/spool/postfix
/var/spool/postfix/defer

Except for the last directory, all above directories must have
read and execute permission for everyone.

drwxr-xr-x  23 root     wheel  512 May 17  2016 /
drwxr-xr-x  25 root     wheel  512 Mar  2  2016 /var
drwxr-xr-x   9 root     wheel  512 May  1  2011 /var/spool
drwxr-xr-x  19 root     wheel  512 Dec 25  2013 /var/spool/postfix
drwx------  18 postfix  wheel  512 Aug 18  2011 /var/spool/postfix/defer

​There where some differences. I brought it up to date:
    drwxr-xr-x 31 root    root 4.0K May 22 16:47 /
    drwxr-xr-x 13 root    root 4.0K May 22 12:03 /var
    drwxr-xr-x 10 root    root 4.0K May 22 13:59 /var/spool
    drwxr-xr-x 18 root    root 4.0K May 22 14:00 /var/spool/postfix/
    drw-r--r--  2 postfix root 4.0K May 22 14:00 /var/spool/postfix/defer
 
​The group is root instead of wheel, but I suppose that should not be a problem. Or is it?
​Now I get:
    postfix: dict_lookup: html_directory = (notfound)
    postfix: mac_parse: /usr/share/doc/postfix/html
    postfix: dict_eval: const  /usr/share/doc/postfix/html
    postfix: dict_update: html_directory = /usr/share/doc/postfix/html
    postsuper: fatal: scan_dir_push: open directory hold: No such file or directory
    postfix/postfix-script: fatal: Postfix integrity check failed!
​While it first was:
    postfix: dict_lookup: html_directory = (notfound)
    postfix: mac_parse: /usr/share/doc/postfix/html
    postfix: dict_eval: const  /usr/share/doc/postfix/html
    postfix: dict_update: html_directory = /usr/share/doc/postfix/html
    postsuper: fatal: scan_dir_push: open directory defer: Permission denied
    postfix/postfix-script: fatal: Postfix integrity check failed!

So I get:
    No such file or directory

Instead of:
    Permission denied​

​But it is there:
    drwxr-xr-x 2 postfix root 4.0K May 23 10:48 /usr/share/doc/postfix/html

And all the permissions are correct:
    drwxr-xr-x   31 root root 4.0K May 22 16:47 /
    drwxr-xr-x   10 root root 4.0K May 22 11:55 /usr/
    drwxr-xr-x  266 root root  12K May 23 11:17 /usr/share/
    drwxr-xr-x 2004 root root  68K May 23 12:02 /usr/share/doc/
    drwxr-xr-x    3 root root 4.0K May 23 10:48 /usr/share/doc/postfix/
​I also created a dummy.html in the directory:
    -rw-r--r-- 1 postfix root 0 May 23 14:22 index.html

But that did not help either. Are there certain files that need to be there?​


--
Cecil Westerhof
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

Geert Stappers
On Tue, May 23, 2017 at 02:26:26PM +0200, Cecil Westerhof wrote:

> 2017-05-23 13:38 GMT+02:00 Wietse Venema <[hidden email]>:
>
> > Check the permissions of
> >
> > /var/spool/postfix
> > /var/spool/postfix/defer
> >
> > Except for the last directory, all above directories must have
> > read and execute permission for everyone.
> >
> > drwxr-xr-x  19 root     wheel  512 Dec 25  2013 /var/spool/postfix
> > drwx------  18 postfix  wheel  512 Aug 18  2011 /var/spool/postfix/defer
> >
>
> ???There where some differences. I brought it up to date:
>     drwxr-xr-x 18 root    root 4.0K May 22 14:00 /var/spool/postfix/
>     drw-r--r--  2 postfix root 4.0K May 22 14:00 /var/spool/postfix/defer
> ???
>

do
  chmod u+x,go-r /var/spool/postfix/defer

to get
  drwx------  2 postfix root 4.0K May 22 14:00 /var/spool/postfix/defer


Groeten
Geert Stappers
--
Leven en laten leven
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

DecebalICT
2017-05-23 14:51 GMT+02:00 Geert Stappers <[hidden email]>:
On Tue, May 23, 2017 at 02:26:26PM +0200, Cecil Westerhof wrote:
> 2017-05-23 13:38 GMT+02:00 Wietse Venema <[hidden email]>:
>
> > Check the permissions of
> >
> > /var/spool/postfix
> > /var/spool/postfix/defer
> >
> > Except for the last directory, all above directories must have
> > read and execute permission for everyone.
> >
> > drwxr-xr-x  19 root     wheel  512 Dec 25  2013 /var/spool/postfix
> > drwx------  18 postfix  wheel  512 Aug 18  2011 /var/spool/postfix/defer
> >
>
> ???There where some differences. I brought it up to date:
>     drwxr-xr-x 18 root    root 4.0K May 22 14:00 /var/spool/postfix/
>     drw-r--r--  2 postfix root 4.0K May 22 14:00 /var/spool/postfix/defer
> ???
>

do
  chmod u+x,go-r /var/spool/postfix/defer

to get
  drwx------  2 postfix root 4.0K May 22 14:00 /var/spool/postfix/defer


​I did not check good enough. :'-(
Updated it, but still the same problem.


--
Cecil Westerhof
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

DecebalICT
In reply to this post by DecebalICT
2017-05-23 14:26 GMT+02:00 Cecil Westerhof <[hidden email]>:
Now I get:
    postfix: dict_lookup: html_directory = (notfound)
    postfix: mac_parse: /usr/share/doc/postfix/html
    postfix: dict_eval: const  /usr/share/doc/postfix/html
    postfix: dict_update: html_directory = /usr/share/doc/postfix/html
    postsuper: fatal: scan_dir_push: open directory hold: No such file or directory
    postfix/postfix-script: fatal: Postfix integrity check failed!
​[...]​
 
​But it is there:
    drwxr-xr-x 2 postfix root 4.0K May 23 10:48 /usr/share/doc/postfix/html

And all the permissions are correct:
    drwxr-xr-x   31 root root 4.0K May 22 16:47 /
    drwxr-xr-x   10 root root 4.0K May 22 11:55 /usr/
    drwxr-xr-x  266 root root  12K May 23 11:17 /usr/share/
    drwxr-xr-x 2004 root root  68K May 23 12:02 /usr/share/doc/
    drwxr-xr-x    3 root root 4.0K May 23 10:48 /usr/share/doc/postfix/
​I also created a dummy.html in the directory:
    -rw-r--r-- 1 postfix root 0 May 23 14:22 index.html

But that did not help either. Are there certain files that need to be there?​
 
​I tried to work with strace. I saw this in the output:
stat("/var/spool/postfix/quick-start", 0x7fff36221440) = -1 ENOENT (No such file or directory)
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f76a34db9d0) = 5844
wait4(-1, postsuper: fatal: scan_dir_push: open directory hold: No such file or directory

I then created it:
    -rw-r--r-- 1 postfix root        0 May 23 16:00 quick-start

Then the no such file does not happen. Instead I get:
    postfix: dict_lookup: html_directory = (notfound)
    postfix: mac_parse: /usr/share/doc/postfix/html
    postfix: dict_eval: const  /usr/share/doc/postfix/html
    postfix: dict_update: html_directory = /usr/share/doc/postfix/html
    postfix/postfix-script: starting the Postfix mail system
    postfix/postfix-script: fatal: mail system startup failed

Something else goes wrong, but it is not said what.

Also the first thing postfix does after seeing the file is there, is removing it. So in the next run the old error is back.

And after removing it postfix quits:
stat("/var/spool/postfix/quick-start", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
stat("/bin/rm", {st_mode=S_IFREG|0755, st_size=64424, ...}) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba591899d0) = 6416
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6416
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=6416, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]})                 = 6416
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba591899d0) = 6417
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6417
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=6417, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]})                 = 6417
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba591899d0) = 6418
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 6418
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=6418, si_uid=0, si_status=1, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]})                 = 6418
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba591899d0) = 6421
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6421
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=6421, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]})                 = 6421
exit_group(1)                           = ?
+++ exited with 1 +++
​Anyone an idea what could be the problem?​

--
Cecil Westerhof
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

John Stoffel-2
In reply to this post by Wietse Venema
>>>>> "Wietse" == Wietse Venema <[hidden email]> writes:

Wietse> DecebalICT:
>> I went from an openSUSE system to a Debian 9 system.

How did you do this upgrade?  A clean install of Debian onto new
partitions?

I suggest that you instead purge postfix on the debian system and then
re-install, getting the default debian configuration installed.  Then
make the *basic* changes to get your old system working.  Not by
copying over the old config, but by instead just adding in the missing
parts to the NEW config.

I wonder if the openSUSE was in a chroot, and the Debian isn't?



>> I tried to copy and adapt my old config for the new system.
>>
>> When running:
>> postfix check
>> I get:
>> postsuper: fatal: scan_dir_push: open directory defer: Permission denied
>>
>> What could be the problem?

Wietse> 1) You have a messed-up file system. Bring the system into single
Wietse> user mode, unmount the file systems, run fsck.foo (foo depends on
Wietse> file system type).

Wietse> 2) You have messed-up SeLinux permissions or labels. For a quick
Wietse> check, turn off SeLinux and see if Postfix works better. Then fix
Wietse> SeLinux or leave it off.

Wietse> 3) You have messed up AppArmor permissions, or some other 'security'
Wietse> software. Same procedure.

Wietse> Wietse
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

DecebalICT
2017-05-23 16:32 GMT+02:00 John Stoffel <[hidden email]>:
>>>>> "Wietse" == Wietse Venema <[hidden email]> writes:

Wietse> DecebalICT:
>> I went from an openSUSE system to a Debian 9 system.

How did you do this upgrade?  A clean install of Debian onto new
partitions?

​It was a clean install on a new PC.
 
​But I copied the data from my old system.

 
I suggest that you instead purge postfix on the debian system and then
re-install, getting the default debian configuration installed.  Then
make the *basic* changes to get your old system working.  Not by
copying over the old config, but by instead just adding in the missing
parts to the NEW config.
 
​I think that that is a very good idea.​

 
I wonder if the openSUSE was in a chroot, and the Debian isn't?

​I am reasonable sure it was not.​
 

--
Cecil Westerhof
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

DecebalICT
2017-05-23 16:49 GMT+02:00 Cecil Westerhof <[hidden email]>:
2017-05-23 16:32 GMT+02:00 John Stoffel <[hidden email]>:
>>>>> "Wietse" == Wietse Venema <[hidden email]> writes:

Wietse> DecebalICT:
>> I went from an openSUSE system to a Debian 9 system.

How did you do this upgrade?  A clean install of Debian onto new
partitions?

​It was a clean install on a new PC.
 
​But I copied the data from my old system.

 
I suggest that you instead purge postfix on the debian system and then
re-install, getting the default debian configuration installed.  Then
make the *basic* changes to get your old system working.  Not by
copying over the old config, but by instead just adding in the missing
parts to the NEW config.
 
​I think that that is a very good idea.​

​That was a good idea yes. I have postfix running, but I cannot send email to an external domain. But that is better in another thread I think.

--
Cecil Westerhof
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

John Stoffel-2

Cecil> ​That was a good idea yes. I have postfix running, but I cannot
Cecil> send email to an external domain. But that is better in another
Cecil> thread I think.

Now you need to send details of your setup from the DEBUGGING docs.
postconf -n, etc.  Do you have a mail server you send all email
through?  Or are you your own domain?

Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

DecebalICT
2017-05-23 18:40 GMT+02:00 John Stoffel <[hidden email]>:

Cecil> ​That was a good idea yes. I have postfix running, but I cannot
Cecil> send email to an external domain. But that is better in another
Cecil> thread I think.

Now you need to send details of your setup from the DEBUGGING docs.
postconf -n, etc.  Do you have a mail server you send all email
through?  Or are you your own domain?

​I have my own domain that is hosted and I send from my office to the hosted server, which should send it to the correct place.

And I found the problem: I should​
 
​have enabled SASL. I have done that now:
    smtp_sasl_auth_enable = yes
    smtp_tls_security_level = encrypt
    smtp_sasl_tls_security_options = noanonymous
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options = noplaintext, noanonymous
    smtpd_sasl_auth_enable = no

And now sending to external domains works.

I thought to be smart, but I really was not. :'-( I could have saved a lot of time by just installing the Debian version and amending it.

There are still some things I should look after, like:
    warning: unable to create missing queue directories

But it is probably not the most urgent.
--
Cecil Westerhof
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

Viktor Dukhovni

> On May 23, 2017, at 1:22 PM, Cecil Westerhof <[hidden email]> wrote:
>
>
> There are still some things I should look after, like:
>     warning: unable to create missing queue directories
>
> But it is probably not the most urgent.

Actually, that *is* your most urgent problem.  Without these
Postfix cannot work, regardless of the rest of the configuration
The $queue_directory must have various requisite subdirectories
with correct ownership.  If the queue_directory has POSIX ACLs
or some other barrier to creation of the required sub-directories,
then Postfix is unusable.

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

DecebalICT
2017-05-23 19:30 GMT+02:00 Viktor Dukhovni <[hidden email]>:

> On May 23, 2017, at 1:22 PM, Cecil Westerhof <[hidden email]> wrote:
>
>
> There are still some things I should look after, like:
>     warning: unable to create missing queue directories
>
> But it is probably not the most urgent.

Actually, that *is* your most urgent problem.  Without these
Postfix cannot work, regardless of the rest of the configuration
The $queue_directory must have various requisite subdirectories
with correct ownership.  If the queue_directory has POSIX ACLs
or some other barrier to creation of the required sub-directories,
then Postfix is unusable.

​OK, thank you for the correction. I will look into it.

I thought because it was a warning and the delivery of my emails works that there was not a real problem. But I stand corrected.

--
Cecil Westerhof
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

Geert Stappers
In reply to this post by Viktor Dukhovni
On Tue, May 23, 2017 at 01:30:15PM -0400, Viktor Dukhovni wrote:

> > On May 23, 2017, at 1:22 PM, Cecil Westerhof <[hidden email]> wrote:
> >
> >
> > There are still some things I should look after, like:
> >     warning: unable to create missing queue directories
> >
> > But it is probably not the most urgent.
>
> Actually, that *is* your most urgent problem.  Without these
> Postfix cannot work, regardless of the rest of the configuration
> The $queue_directory must have various requisite subdirectories
> with correct ownership.  If the queue_directory has POSIX ACLs
> or some other barrier to creation of the required sub-directories,
> then Postfix is unusable.

Previous in this thread there was
drw-r--r--  2 postfix root 4.0K May 22 14:00 /var/spool/postfix/defer

So my bet is on: "more directory without execute permission"


Groeten
Geert Stappers
--
Leven en laten leven
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

DecebalICT
In reply to this post by Viktor Dukhovni
2017-05-23 19:30 GMT+02:00 Viktor Dukhovni <[hidden email]>:

> On May 23, 2017, at 1:22 PM, Cecil Westerhof <[hidden email]> wrote:
>
>
> There are still some things I should look after, like:
>     warning: unable to create missing queue directories
>
> But it is probably not the most urgent.

Actually, that *is* your most urgent problem.  Without these
Postfix cannot work, regardless of the rest of the configuration
The $queue_directory must have various requisite subdirectories
with correct ownership.  If the queue_directory has POSIX ACLs
or some other barrier to creation of the required sub-directories,
then Postfix is unusable.

​I do not understand. It looks OK to me.
The queue directory is /var/spool/postfix​ and the way to it looks OK (to me).
    drwxr-xr-x 31 root root 4.0K May 22 16:47 /
    drwxr-xr-x 13 root root 4.0K May 22 12:03 /var
    drwxr-xr-x 10 root root 4.0K May 22 13:59 /var/spool
    drwxr-xr-x 20 root root 4.0K May 23 16:53 /var/spool/postfix​
 

​The directory itself looks also OK to me:
​    drwx------ 2 postfix root     4.0K May 23 19:10 active
    drwx------ 2 postfix root     4.0K May 23 18:54 bounce
    drwx------ 2 postfix root     4.0K May 22 14:00 corrupt
    drwx------ 3 postfix root     4.0K May 23 17:36 defer
    drwx------ 3 postfix root     4.0K May 23 17:36 deferred
    drw-r--r-- 2 postfix root     4.0K May 23 17:10 dev
    drwxr-xr-x 3 root    root     4.0K May 23 19:10 etc
    drwx------ 2 postfix root     4.0K May 22 14:00 flush
    drwx------ 2 postfix root     4.0K May 23 16:39 hold
    drwx------ 2 postfix root     4.0K May 23 19:10 incoming
    drwxr-xr-x 3 root    root     4.0K May 23 17:10 lib
    drwx-wx--T 2 postfix postdrop 4.0K May 23 19:10 maildrop
    drwxr-xr-x 2 root    root     4.0K May 23 17:36 pid
    drwx------ 2 postfix root     4.0K May 23 19:10 private
    drwx--s--- 2 postfix postdrop 4.0K May 23 19:10 public
    drwx------ 2 postfix root     4.0K May 22 14:00 saved
    drwx------ 2 postfix root     4.0K May 23 16:39 trace
    drwxr-xr-x 3 root    root     4.0K May 23 16:53 usr

Or am I missing something?

--
Cecil Westerhof
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

Viktor Dukhovni

> On May 23, 2017, at 1:43 PM, Cecil Westerhof <[hidden email]> wrote:
>
> ​The directory itself looks also OK to me:
> ​    drwx------ 2 postfix root     4.0K May 23 19:10 active
>     drwx------ 2 postfix root     4.0K May 23 18:54 bounce
>     drwx------ 2 postfix root     4.0K May 22 14:00 corrupt
>     drwx------ 3 postfix root     4.0K May 23 17:36 defer
>     drwx------ 3 postfix root     4.0K May 23 17:36 deferred
>     drw-r--r-- 2 postfix root     4.0K May 23 17:10 dev
>     drwxr-xr-x 3 root    root     4.0K May 23 19:10 etc
>     drwx------ 2 postfix root     4.0K May 22 14:00 flush
>     drwx------ 2 postfix root     4.0K May 23 16:39 hold
>     drwx------ 2 postfix root     4.0K May 23 19:10 incoming
>     drwxr-xr-x 3 root    root     4.0K May 23 17:10 lib
>     drwx-wx--T 2 postfix postdrop 4.0K May 23 19:10 maildrop
>     drwxr-xr-x 2 root    root     4.0K May 23 17:36 pid
>     drwx------ 2 postfix root     4.0K May 23 19:10 private
>     drwx--s--- 2 postfix postdrop 4.0K May 23 19:10 public
>     drwx------ 2 postfix root     4.0K May 22 14:00 saved
>     drwx------ 2 postfix root     4.0K May 23 16:39 trace
>     drwxr-xr-x 3 root    root     4.0K May 23 16:53 usr
>
> Or am I missing something?

Why is scan_dir_push failing for the "hold" subdirectory?
Stop Postfix, then as root run "postsuper -s".  Does that
log any errors.  If so, find out why and fix.

Or if your mail queue is empty, just uninstall Postfix,
delete the entire /var/spool/postfix directory and all
its content, then re-install Postfix, which will get
you a fresh /var/spool/postfix, presumably without
all the permission problems.

If the queue is not empty, disable inbound mail and
let it drain first.

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

Bastian Blank-3
In reply to this post by DecebalICT
On Tue, May 23, 2017 at 07:43:56PM +0200, Cecil Westerhof wrote:
>     drw-r--r-- 2 postfix root     4.0K May 23 17:10 dev

Please tell me you didn't see that this directory is missing some
permissions.

Bastian

--
Is truth not truth for all?
                -- Natira, "For the World is Hollow and I have Touched
                   the Sky", stardate 5476.4.
Reply | Threaded
Open this post in threaded view
|

Re: scan_dir_push: open directory defer: Permission denied

DecebalICT
In reply to this post by Viktor Dukhovni
2017-05-23 19:57 GMT+02:00 Viktor Dukhovni <[hidden email]>:

> On May 23, 2017, at 1:43 PM, Cecil Westerhof <[hidden email]> wrote:
>
> ​The directory itself looks also OK to me:
> ​    drwx------ 2 postfix root     4.0K May 23 19:10 active
>     drwx------ 2 postfix root     4.0K May 23 18:54 bounce
>     drwx------ 2 postfix root     4.0K May 22 14:00 corrupt
>     drwx------ 3 postfix root     4.0K May 23 17:36 defer
>     drwx------ 3 postfix root     4.0K May 23 17:36 deferred
>     drw-r--r-- 2 postfix root     4.0K May 23 17:10 dev
>     drwxr-xr-x 3 root    root     4.0K May 23 19:10 etc
>     drwx------ 2 postfix root     4.0K May 22 14:00 flush
>     drwx------ 2 postfix root     4.0K May 23 16:39 hold
>     drwx------ 2 postfix root     4.0K May 23 19:10 incoming
>     drwxr-xr-x 3 root    root     4.0K May 23 17:10 lib
>     drwx-wx--T 2 postfix postdrop 4.0K May 23 19:10 maildrop
>     drwxr-xr-x 2 root    root     4.0K May 23 17:36 pid
>     drwx------ 2 postfix root     4.0K May 23 19:10 private
>     drwx--s--- 2 postfix postdrop 4.0K May 23 19:10 public
>     drwx------ 2 postfix root     4.0K May 22 14:00 saved
>     drwx------ 2 postfix root     4.0K May 23 16:39 trace
>     drwxr-xr-x 3 root    root     4.0K May 23 16:53 usr
>
> Or am I missing something?

Why is scan_dir_push failing for the "hold" subdirectory?

​What do you mean?

 
Stop Postfix, then as root run "postsuper -s".  Does that
log any errors.  If so, find out why and fix.

​No it does not​
 

 
Or if your mail queue is empty, just uninstall Postfix,
delete the entire /var/spool/postfix directory and all
its content, then re-install Postfix, which will get
you a fresh /var/spool/postfix, presumably without
all the permission problems.

​I could do that. Just need to be sure what to save. (At least main.cf.)
But I think it is time for a break. ;-)

--
Cecil Westerhof
12