Pages

Friday, October 4, 2013

Prevent FTP user from deleting the file



1)Create an ftp user with access to public_html user. (user1)
2)Create another user with access to public_html/upload (user2)
3)Create a file named .ftpaccess and write these into the file and save it to public_html/upload


Code:

 <Directory /home/"DAUSER"/domains/"DOMAIN"/public_html/upload/>
    <Limit DELE,RETR>
      AllowUser "USER1"
      DenyAll
    </Limit>
  </Directory>

0 comments:

Post a Comment