Error when setting autoreply, Bad file descriptor

19 posts / 0 new
Last post
#1 Tue, 05/19/2009 - 08:01
mnt_schred

Error when setting autoreply, Bad file descriptor

I've transfered a (series of) domains from one server to another which worked splendidly for both (mail)users as website (jay, backup/restore!) but...

When I try to set an Out of Office autoreply I recieve this error:

Failed to save alias : Failed to open /home/HOMEDIR/domains/DOMAIN/autoreply-EMAIL.txt for writing : Bad file descriptor

(where HOMEDIR, DOMAIN and EMAIL have been substituted for obvious reasons.)

I've got no clue why this is happening though?

Tue, 05/19/2009 - 09:08
andreychek

Howdy,

Two thoughts on that --

1. Does the directory "/home/HOMEDIR/domains/DOMAIN/" exist?

2. Are you certain that user has enough space on their quota, as well as the parent Virtual Server?

Either of the above could cause what you're seeing.
-Eric

Tue, 05/19/2009 - 12:49 (Reply to #2)
mnt_schred

Any more research I can do before posting the bug?

Tue, 05/19/2009 - 12:57 (Reply to #3)
Joe
Joe's picture

I don't really know. It's just a weird error.

You could try restarting Webmin and trying it again. You might also turn up logging a bit in Webmin (in Webmin->Webmin Configuration->Debugging Log File) to look for clues. Jamie might find that information helpful when tracking down the problem. But, I dunno. ;-)

--

Check out the forum guidelines!

Tue, 05/19/2009 - 13:31 (Reply to #4)
mnt_schred

Alas, restarting webmin had no effect. I'll wait for Jamie's insights.
edit: I think it's a permission problem after all, because I can maken another autoreply on that server.

Tue, 05/19/2009 - 15:07 (Reply to #5)
Joe
Joe's picture

So, yeah, seems like you'll want to make sure that directory and file is write-able by the user in question.

--

Check out the forum guidelines!

Tue, 05/19/2009 - 13:35 (Reply to #6)
ronald
ronald's picture

whenever I have such error it has always come down to a permission problem. per haps use the chown cmd on it.

Tue, 05/19/2009 - 15:53 (Reply to #7)
mnt_schred

But I think that's the problem- because of the fact virtualmin wants to put the file at the wrong location. Not in the users homedir, but the parent directory..

I've chmod the dir to 777 and now it works, maybe because this is an alias instead of an user it fails?

Tue, 05/19/2009 - 16:10 (Reply to #8)
Joe
Joe's picture

<div class='quote'>But I think that's the problem- because of the fact virtualmin wants to put the file at the wrong location. Not in the users homedir, but the parent directory..</div>

It's probably failing at that point, not trying to actually put the file there (if it is that'd either be a bug or misconfiguration).

<div class='quote'>I've chmod the dir to 777 and now it works, maybe because this is an alias instead of an user it fails? </div>

Oh noes! Never chmod 777. Pretend like that's impossible. 770 or 750 should be the only modes you know about.

--

Check out the forum guidelines!

Tue, 05/19/2009 - 16:29 (Reply to #9)
mrwilder

I'm curious... if you look at &quot;email settings&quot; is

Inbox mail file

set to

/home/HOMEDIR/domains/DOMAIN/homes/USER/Maildir

?

Wed, 05/20/2009 - 02:47 (Reply to #10)
mnt_schred

Where exactly should I look at the e-mail settings?

Wed, 05/20/2009 - 16:31 (Reply to #11)
Joe
Joe's picture

<div class='quote'>Inbox mail file

set to

/home/HOMEDIR/domains/DOMAIN/homes/USER/Maildir</div>

That seems right, doesn't it?

--

Check out the forum guidelines!

Wed, 05/20/2009 - 15:34 (Reply to #12)
mrwilder

The setting I was referring to is at

Virtualmin-&gt;Edit Mail and FTP Users-&gt;(Select USERNAME)-&gt;Email Settings-&gt;Inbox mail file

Also, do this: SSH to the box as the user in question and see if you even can cd /home/HOMEDIR/domains/DOMAIN/ I bet you can't... the path doesn't look right. But if you can, &quot;touch autoreply-EMAIL.txt&quot; and see what happens.

Also, see if this path exists:
/home/MAINDOMAIN/domains/SUBDOMAIN/homes/HOMEDIR/

I suspect either this or
/home/MAINDOMAIN/domains/SUBDOMAIN/homes/HOMEDIR/Maildir
is where the file should go...

Have you pasted the EXACT error message here?

Sat, 05/23/2009 - 13:33 (Reply to #13)
mrwilder

Well, yes, the path seems sane:
/home/HOMEDIR/domains/DOMAIN/

But it seems highly unlikely that the program would want to put the autoreply there:
/home/HOMEDIR/domains/DOMAIN/autoreply-EMAIL.txt

A more likely path sure sounds like:
/home/HOMEDIR/domains/DOMAIN/homes/USER/autoreply-EMAIL.txt
or
/home/HOMEDIR/domains/DOMAIN/homes/USER/Maildir/autoreply-EMAIL.txt

So I'm guessing one of two things happened: a) the path doesn't exist or b) some critical piece of user data didn't make it to the email settings and so the program really is trying to save the file in the wrong folder... &quot;/home/HOMEDIR/domains/DOMAIN/&quot;

It seems reasonable to verify the existence of the path, and if so, check the permissions on the autoreply file, if it exists, and if it doesn't, create it... first thing.

Least, that's what I'd do given no other information.

Sat, 05/23/2009 - 13:37 (Reply to #14)
mrwilder

Oh my bad, Joe... yes, the path you listed IS the normal path on both of my boxes... both having different OSes, so, I would assume that's where it should go.

So the question is, why is the file descriptor pointing to the wrong place?

mnt_schred: do you have the FREE program called Putty?

Sat, 05/23/2009 - 14:33 (Reply to #15)
Joe
Joe's picture

So, this is just sort of going around in circles. I'll ask Jamie to chime in on this, as it's sounding bug-like, but I don't know how to tell you what more information Jamie would need to troubleshoot it.

--

Check out the forum guidelines!

Sat, 05/23/2009 - 19:18 (Reply to #16)
Joe
Joe's picture

This is an autoreply for an alias rather than for a mailbox user, right? If so, it won't be in a user's directory .. rather, the file containing the autoreply message will be created in the domain's home directory.

One thing to check is the ownership of the /home/HOMEDIR/domains/DOMAIN directory - make sure it is owned by the same user as /home/HOMEDIR, which should be the administration login for the domain.

--

Check out the forum guidelines!

Tue, 05/19/2009 - 10:55
mnt_schred

1.) Yes

2.) Yes

Tue, 05/19/2009 - 12:26 (Reply to #18)
Joe
Joe's picture

Looks bug-like to me.

--

Check out the forum guidelines!

Topic locked