Last Post

NOTE: Forum is available ijdigital.com




Results 1 to 8 of 8

Thread: [ASK] How to prevent files from being overwritten?

  1. #1
    Warrant Officer
    Join Date
    Feb 2011
    Posts
    258
    Thanks
    94
    Thanked 169 Times in 52 Posts
    Rep Power
    9

    Default [ASK] How to prevent files from being overwritten?

    I've got a few wordpress sites that lately were compromised. I haven't found the root of the problem yet, but it just adds strings of text, numbers, and base 64 code stuff.

    I've always had wordfence on, and it does a good job of finding altered files. I've now added the all in one security and firewall plugin, which seems pretty good too.

    I still can't find the root problem though, so files keep getting overwritten. Is there a plugin or a way to just prevent files from being overwritten at all? I guess some may need to be for functionality, but I'd like to just stop most of them from being overwritten at all. Is there a plugin or way to do that?

  2. #2
    Hot-Headed & Cold-Blooded digitalx's Avatar
    Join Date
    Oct 2007
    Location
    France
    Posts
    2,139
    Thanks
    1,547
    Thanked 1,896 Times in 552 Posts
    Rep Power
    15

    Default

    You can protect files using this:

    chattr +i filename.ext

    To remove the protection:

    chattr -i filename.ext

    artists use lies to tell the truth ... while politicans use them to cover the truth up

  3. #3
    Warrant Officer
    Join Date
    Feb 2011
    Posts
    258
    Thanks
    94
    Thanked 169 Times in 52 Posts
    Rep Power
    9

    Default

    Thanks. And I would do that through SSH? Can you see any harm in doing it? if it works, why don't security plugins use it?

  4. #4
    Hot-Headed & Cold-Blooded digitalx's Avatar
    Join Date
    Oct 2007
    Location
    France
    Posts
    2,139
    Thanks
    1,547
    Thanked 1,896 Times in 552 Posts
    Rep Power
    15

    Default

    yes this is done with SSH .. there is no harm if you know which files to lock ... for instance I used to do this on php.ini
    because if I updated my install the php.ini file would get overwritten
    and some other ones but that was a while back so...

    also WP has many vulnerabilities so you need to choose a good security option
    also look into "Iptables" but then you are looking at a part time job keeping fnckers from scanning for exploits
    I used to spend 1/2 a hour a day looking at the logs and adding the IPs of attempted exploit scanners
    so anyway good luck

    I gave all that shit up I had 20+ websites and between servers shutting your sites down for what ever reason
    being hacked ... the expense and all that to not break even, I just let my site expire
    and now I'm a professional reseller on Amazon and I've never made such consistent money ... like clockwork

    cheers
    Last edited by digitalx; 02-17-2016 at 07:53 PM.

    artists use lies to tell the truth ... while politicans use them to cover the truth up

  5. The Following 2 Users Say Thank You to digitalx For This Useful Post:

    bohskiak56 (08-23-2016), iranjavamember (02-21-2016)

  6. #5
    Warrant Officer
    Join Date
    Feb 2011
    Posts
    258
    Thanks
    94
    Thanked 169 Times in 52 Posts
    Rep Power
    9

    Default

    Well, you're right it's a lot of work keeping out the hacker BS. Would like to hear more about your amazon reselling if you have time.

  7. #6
    Hot-Headed & Cold-Blooded digitalx's Avatar
    Join Date
    Oct 2007
    Location
    France
    Posts
    2,139
    Thanks
    1,547
    Thanked 1,896 Times in 552 Posts
    Rep Power
    15

    Default

    Quote Originally Posted by icu View Post
    Well, you're right it's a lot of work keeping out the hacker BS. Would like to hear more about your amazon reselling if you have time.

    the AZ thing... to setup and get all the details ironed out takes some getting your head around
    but once you get past that stage it's just a routine

    I use jungle scout to scan the barcodes on "new" items that are found on sale, clearance or end of series, etc...
    if there is a profit to be made I buy all of them and send them off to the AZ warehouse and they take care of the rest

    I try to aim for a minimum sales point of around 15€/18€... so if I can find something selling for 2€/3€ with a "low sales rank" and resell it for 15€/18€ them I'm good
    but this is minimum I have bought inventory for up to 30€+ with extremely low sales rank and sold them on AZ for 4 x the price I bought them for

    two of my best finds were from my local super market, there were two lego sets one star wars and the other some truck building thing... I bought them for 28€ each
    kept them till just before xmas and sold one for 250€ and the other for 170€ ... this is rare, but I do fine things on clearance for 5€/8€ and sell for 25€+ often

    it sounds complicated but it's really a no brainer, I'm going to a shop that sells clearance stuff later since I'm off today ... I work construction so amazon is a side thing.

    I haven't graduated to importing on alibaba and selling on AZ yet, that's a whole other animal with much greater risk rewards

    artists use lies to tell the truth ... while politicans use them to cover the truth up

  8. The Following 2 Users Say Thank You to digitalx For This Useful Post:

    icu (02-19-2016), iranjavamember (02-21-2016)

  9. #7
    Private 1st Class
    Join Date
    Aug 2016
    Location
    new york
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Make the file read only. Make the file have to have certain permissions to be overwritten.

  10. #8
    Private 1st Class
    Join Date
    Sep 2016
    Location
    pune
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    • Add the file to your package.
    • Go to the Setup Editor and select the Tables tab. ...
    • Select the Components tab and right-click on the component name.
    • Select Details; the Component Details dialog appears.
    • Mark the checkbox option to "Never overwrite if keypath exists." ...
    • Click OK.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT. The time now is 03:40 AM.

eXTReMe Tracker