Do not fill user's home folder
Hi,
I am currently trying to use cPanel for a slightly different purpose than hosting public facing websites. I need to stop cPanel from automatically adding files to the users home directory such as public_html, public_ftp etc.
I've tried using a bash script to delete the files after account creation but it doesnt work.
Can anyone suggest how I could allow WHM to create an account, but not to fill the user directory with the default files?
Thanks
-
Hello, There's the "Skeleton Directory" feature, but using that that won't prevent the creation of every directory and file. Could you let us know what bash script you are using and how you have implemented it? Thank you. 0 -
Hi Michael Thanks, yes ive tried to use the skeleton directory but it still creates all the other files. I would like there to be nothing inside the users folder. I tried the following command inside postwwwacct: rm -rf /home/virtfs/home/$user/* The above command does not work. Any help would be great! 0 -
Hi Michael, thanks for that. I have placed the script in all 3 of the locations specified in the account creation output but none of them are calling the script. Running post creation scripts (/usr/local/cpanel/scripts/legacypostwwwacct, /usr/local/cpanel/scripts/postwwwacct, /usr/local/cpanel/scripts/postwwwacctuser)......Done The script is #!/bin/bash wall called I am not getting any broadcasts after creating an account. Do you know why this script is not running? Thanks 0 -
Update: Hi Michael, I was able to resolve the issue using your standardized webhooks. Everything is working for me now. Thanks for your help. 0 -
I am happy to see the issue is now resolved. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
6 comments