These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Error when setting autoreply, Bad file descriptor on the new forum.
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?
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
Any more research I can do before posting the bug?
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!
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.
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!
whenever I have such error it has always come down to a permission problem. per haps use the chown cmd on it.
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?
<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!
I'm curious... if you look at "email settings" is
Inbox mail file
set to
/home/HOMEDIR/domains/DOMAIN/homes/USER/Maildir
?
Where exactly should I look at the e-mail settings?
<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!
The setting I was referring to is at
Virtualmin->Edit Mail and FTP Users->(Select USERNAME)->Email Settings->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, "touch autoreply-EMAIL.txt" 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?
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... "/home/HOMEDIR/domains/DOMAIN/"
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.
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?
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!
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!
1.) Yes
2.) Yes
Looks bug-like to me.
--
Check out the forum guidelines!