Jump to content

Makoto

Clients
  • Posts

    5,279
  • Joined

  • Last visited

  • Days Won

    32

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by Makoto

  1. We seem to be getting stuck up on a single use-case scenario here for some reason. People sell things other than software with Commerce.

    This is not really an issue as software is not an example of something a lot of people really use commerce for. Art and photography are two prime examples that could highly benefit from such a system. As well as e-books, and so on.

  2. One option is to keep your applications and plugins folders locked down (remove all writable permissions), but you have to be careful when doing this. If you ever need to update or install a new application (including IPS core applications themselves), you must remember to re-enable writable permissions to the folders.

    Outside of that, if security is paramount one of the best things to do is implement a Mandatory Access Control system with grsecurity, but this is a very advanced and complicated topic.

  3. @Jimmy Gavekort thanks for taking the time to share that, but I'm afraid there's not a practical use for it.

    I had a similar set of rules at one point, but considering that the applications folder and so on are ordinarily always left writable, all someone would have to do to get around that is upload malicious scripts to the interface folders. Even if you whitelisted individual scripts in the interface folders, an attacker could still overwrite those files with malicious code.

    So it's a lot of hassle for little to no benefit.

  4. As a side note, regarding the security update in 4.14.1.3 (as it includes Apache specific information):

    Quote

    This release contains a security update to address a possible issue where uploaded files may execute as scripts. For this to happen, a server must be configured to allow for very loose rules for what is an executable script. Most servers will not be vulnerable to this issue but we have no way of detecting which may be so we are releasing this security update as a precaution.

    It is recommended this release is installed as soon as possible.

    This new version improves the security of the .htaccess protection for the /uploads folder on your site. If you have already enabled the security feature "Protect Writeable Folders From Dangerous Files", then you will need to manually update the .htaccess file which you can do simply by opening "uploads/.htaccess" in a text editor and replacing its contents with:

    
    #<ipb-protection>
    <Files ~ "^.*\.(php|cgi|pl|php3|php4|php5|php6|phtml|shtml|([a-z0-9]{32}))$">
        Order allow,deny
        Deny from all
    </Files>
    #</ipb-protection>
     

    As long as you followed the instructions in this guide (specifically, see the "Rewrite" rules and named location blocks section), you are already completely protected from what IPS is referring to.

    This is further prevented (the "correct" way) by ensuring cgi.fix_pathinfo is disabled in your PHP(-FPM) configuration and security.limit_extensions is locked down to only allowing execution of .php scripts in PHP-FPM.

  5. On 9/5/2016 at 1:30 PM, klierik said:

    I try to use

    
    chmod +x task.php

    w/o any result. I tried restart nginx/fpm, fix perm, and chmod again — no any lucky.

    3

    ACL permissions override chmod, so you will need to grant executable permissions to task.php via setfacl instead.

    setfacl -m "u:cron-user:r-x" applications/core/interface/task/task.php

    Replace "cron-user" with whatever user is executing task via cron.

    On 5/26/2016 at 2:07 AM, Cyrem said:

    What may the cause of this? I assume it might be the fact that the webapp config isn't right without the ACL setup?

    1

    Do you see anything in your Nginx error log?

    Your error indicates there is an issue communicating with the PHP-FPM backend. Your error log should highlight the specific issue.

  6. 5 hours ago, Jimmy Gavekort said:

    Offtopic, how did you make this fancy design?

    My guides are written using a template I purchased from ThemeForest a while back.

    You can find it here,
    http://themeforest.net/item/vsdocs-online-documentation-template/11418861

    Eventually I'll have posts/guides like this compiled and posted somewhere online, instead of only available as post snippets here.

    This is also the template I use to write the readme's included with my newer applications, such as Bulk Downloader,
    https://www.makoto.io/docs/bulkdl/index.html

  7. 7 hours ago, Sull5 said:

    Thoughts on the issue ?

    I'm actually able to reproduce this, but I'm not sure if there's a solution. It only happens when upgrading applications, not installing.

    The error is caused because PHP is (intentionally) not allowed to change permissions on files it overwrites when they are not owned by www-data. This, in turn, causes PHP's Phar library to throw a fit and abort. It's actually irrelevant, ACL permissions make it where PHP doesn't need to handle permissions on its own, but PHP doesn't seem to care or offer any simple way to get around it that I can see. If it can't set permissions on files extracted with Phar, it will abort.

    The simple short term solution is to manually change the file ownership of the applications you're upgrading, I'll see if I can provide a more official workaround in the future however.

  8. On 1/7/2016 at 1:05 AM, icedream said:

    Thanks, how should I configure php session filepath and opcache filepath, I am not totally understanding about the acl. And if I add microcache for nginx, what permission should I set for cache_path and tmp_path?

    Unless you have a reason to, there's really no reason you should need or want to change the default session/opcache filepaths. Regarding microcache, I haven't actually used that as of yet, but I imagine that's also something that is just written to tmp and is owned by Nginx on write? You'll have to review the documentation yourself on that one.

    On 1/26/2016 at 4:13 AM, Bliblou said:

    There is a tutorial for conf when forum is in directory ?

    I'm sorry, I have no idea what you are asking. If you still need help, can you please clarify what the problem / question is..?

    17 hours ago, Sull5 said:

    If I set the user:group recursively on applications/cjmenu to www-data:www-data the application will upgrade without a hitch. 

    I thought we shouldn't have an issue since www-data has read and write access through acl ?

    Are you upgrading using IPS4's FTP upgrader? Naturally, if you are using FTP, your FTP user will need read/write access to the files as well. Ideally, if you can, you should just set up an FTP account for the webapp user and utilize that account for upgrades.

×
×
  • Create New...