Enabling/disabling proftpd accounts with PHP and WHM

Posted by Brett G on Pro Webmasters See other posts from Pro Webmasters or by Brett G
Published on 2012-02-20T00:38:43Z Indexed on 2012/03/21 5:40 UTC
Read the original article Hit count: 275

Filed under:
|
|

I have a VPS with WHM/CPanel which is being used just by me. It's utilizing proftpd. I'd like to, via a PHP script, disable/enable a specific FTP account. I've done this by having PHP call a bash script which removes/adds the user account line to /etc/proftpd/USERNAME password file. However, in order to do this I have to give other write rights to /etc/proftpd/USERNAME. This isn't ideal, and I'd be willing to do it another way. It also seems like WHM is automatically resetting these permissions on a regular basis. Does anybody have any ideas on a better way to deal with this?

© Pro Webmasters or respective owner

Related posts about php

Related posts about cpanel