Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

FTP system automatically delete .PHP

Discussion in 'Security' started by Sametto Chan, Sep 6, 2017.

  1. Sametto Chan

    Sametto Chan Well-Known Member

    Joined:
    Jun 24, 2016
    Messages:
    242
    Likes Received:
    22
    Trophy Points:
    93
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi,


    1. It is possible to FTP Account security system user to upload in .PHP to automatically deleted. Not a shell script, Only a .PHP from subfolder. /public.html/subfolder/subfolder.

    OR

    2. It is possible to Add folder directory to FTP Security system allowed .JPG and .PNG?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,457
    Likes Received:
    57
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    You have not put the questions properly, so it is bit difficult to understand it clearly. From what I can understand is you want to say that is it possible to delete the .php file automatically through FTP?, right? the answer to it would be that it will not automatically remove the file. It can overwrite an existing file, but cannot delete a file automatically. you have to do it manually.

    If possible, please explain what exactly you want with an example..
     
  3. Sametto Chan

    Sametto Chan Well-Known Member

    Joined:
    Jun 24, 2016
    Messages:
    242
    Likes Received:
    22
    Trophy Points:
    93
    cPanel Access Level:
    Root Administrator
    Twitter:
    Correct, We want needing for that add directory subfolder from own account and FTP Security system to allow for .PNG & .JPG for image only. Without execution.

    Because I can't give to my content manager access to FTP is not enough security. We needed for allowed .JPG and .PNG by folder only.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,220
    Likes Received:
    1,376
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  5. Sametto Chan

    Sametto Chan Well-Known Member

    Joined:
    Jun 24, 2016
    Messages:
    242
    Likes Received:
    22
    Trophy Points:
    93
    cPanel Access Level:
    Root Administrator
    Twitter:
    Pure-ftpd, a way to modify ftp configuration to limit file size? | Web Hosting Talk

    I'm afraid, Can you tell me for that where to edit the file. CentOS 7.3 only and FTP system with WHM. I want to be safe. Without error and problem.

    But you still understand my question? What I mean, there.
    Code:
    If you access the FTP system then uploaded to server from public_html/library/test/test.php need to be deleted.
    That is subfolder however. Not All Folder. It is added to folder line and own account.
    
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,220
    Likes Received:
    1,376
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    The path for the Pure-FTPd uploadscript binary is "/usr/sbin/pure-uploadscript", however I recommend consulting with a system administrator for help setting that up as it's unsupported. You can find a list of system administration services at:

    System Administration Services | cPanel Forums

    Thank you.
     
  7. Sametto Chan

    Sametto Chan Well-Known Member

    Joined:
    Jun 24, 2016
    Messages:
    242
    Likes Received:
    22
    Trophy Points:
    93
    cPanel Access Level:
    Root Administrator
    Twitter:
    I edited the file was said NULL. I don't need for the managed server.

    Code:
    ELF          
    
    I opened this file to edit said NULL. Doesn't work.

    I would like to say deny of .PHP and .PHP.JPG, Others extensions. from here,

    The subfolder - (AnimeCover) needed for deny .PHP extensions, they cannot be against to upload of shell script hacker. It is better to improve security.

    That why I really needed for this.
     
    #7 Sametto Chan, Sep 7, 2017
    Last edited by a moderator: Sep 8, 2017
  8. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,457
    Likes Received:
    57
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    I have thought of another way to do this. You can set a cron to remove the .php file from a folder and execute it every minute, so as soon as anyone uploads PHP file, the next minute the PHP files will be gone. You can also do this via bash script and set what extensions you want to remove from the FTP location you want..
     
  9. Sametto Chan

    Sametto Chan Well-Known Member

    Joined:
    Jun 24, 2016
    Messages:
    242
    Likes Received:
    22
    Trophy Points:
    93
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yep, FTP Location with cPanel account.
     
Loading...

Share This Page