Well long time no post. Latest problem that I found was that I didn’t see the dot file on ftp client.
The ftp server was vsftdp.
The fix is
force_dot_files=YES
Of course you have to restart the vsftdp server after adding this line to conf.
Well long time no post. Latest problem that I found was that I didn’t see the dot file on ftp client.
The ftp server was vsftdp.
The fix is
force_dot_files=YES
Of course you have to restart the vsftdp server after adding this line to conf.
Well today I wanted to make a script to automatically create some user for an account from shell, that’s because they where to many to make them manually from cpanel/whm . Also this command work on your server even if you have pure-ftpd or proftpd ) , because the cpanel keep the virtual user information into /etc/proftpd/
So , how to add a ftp user from shell ?
Well the syntax is :
/usr/local/cpanel/bin/proftpd_passwd
So first of all we have to know the uid and gid for this we can grep the passwd file.
grep
Example how to add a username for matrafox system user :
grep matrafox /etc/passwd
matrafox:x:xxx:yyy::/home/matrafox:/usr/local/cpanel/bin/noshell
/usr/local/cpanel/bin/proftpd_passwd matrafox -a testuser:testpassword:xxx:yyy:matrafox:/home/matrafox/public_html:/sbin/nologin
If you want to detele a user the syntax is:
/usr/local/cpanel/bin/proftpd_passwd
Also if you manually edit a file you should run also the command so changes to take effect :
/usr/local/cpanel/bin/ftpupdate
Email forwarding for your domain is controlled by special files you put in your home directory. All of these files begin with “.qmail-” and end with the username.
For example, joe@yourdomain.com would be controlled by the file “.qmail-joe”. This is a text file, containing the list of destination addresses, one address per line.
If the file is empty (0 bytes), mail for that user will be delivered to you. (You need to be sure the file is zero bytes, an empty file of just one blank line will not work.)
These files must be uploaded in ASCII mode.
There is one special username called “default” (use the file “.qmail-default”) that will forward all mail for your domain that is not already specified with its own forwarding file.
If this file is 0 bytes, all mail going to anybody at your domain will be delivered to you.
If you have a separate POP3 account for your domain, you need to forward the mail to that user. For example, a POP3 account named “jack” needs to have a “.qmail-jack” file with just the word “jack” inside.
If you don’t do this, mail for jack will be delivered to the address given in the “.qmail-default” file (or to yourself if it’s empty). If you don’t have a default forwarding and don’t set the forwarding for jack, mail to jack will be returned with a “user unknown” error message.
For email addresses with a dot in it (first.last@yourdomain.com), you need to change the . to : in the “.qmail-” file.
For example, joe.blow@yourdomain.com is controlled by the file “.qmail-joe:blow”.
Be careful to never have any blank lines or spaces in a “.qmail-” file, and always put each destination address on a different line.
So for example for user test@example.com if we want to forward all e-mail and keep a copy we will have the file .qmail-test with this into example directory :
&test@test2.com
./test/Maildir/
The last parameter in the .qmail-default file tells vdelivermail what to do with non-matching emails. The default is to bounce the email back to the sender. But you can also delete it instead.
update your .qmail-default file from something like this:
| /home/vpopmail/bin/vdelivermail ” bounce-no-mailbox
to something like this:
| /home/vpopmail/bin/vdelivermail ” delete
Well, after install and move one server to other one problem is to keep same information in php.ini . However I don’t think is ok just to copy and replace them, so a compare script should be run.
So I found one , and improve it a little.
cat comparephpini.php
$val ) {
if( $val == $c2[$key] ) continue;
echo $key.': '.$c1[$key].' // '.$c2[$key]."\n";
}
foreach( $c2 as $key => $val ) {
if( $val == $c1[$key] ) continue;
echo $key.': '.$c2[$key].' // '.$c1[$key]."\n";
}
Powered by WordPress