Learn about Centmin Mod LEMP Stack today
Become a Member

Xenforo Xenforo directory permissions, deleting addons

Discussion in 'Forum software usage' started by MaximilianKohler, Jun 17, 2025.

  1. MaximilianKohler

    MaximilianKohler Member

    214
    9
    18
    Jun 23, 2023
    Ratings:
    +39
    Local Time:
    10:52 PM
    The Xenforo installation guide https://community.centminmod.com/th...on-centmin-mod-123-09beta01-lemp-stack.16060/ lists these commands:
    Code:
    cd /home/nginx/domains/yourdomain.com/public
    chmod 0777 internal_data data
    Missing are the "js" and "src" folders that addons get installed into. The addons work, but when you try to uninstall & delete the files via the ACP, you get an error.
    Is it safe to change those folder permissions to 0777 as well? Or must we manually delete the addons' files after uninstalling them?

    It defaults to 755. I think this was discussed before, but I couldn't find it. Just this related one for installing styles that only mentions ownership: https://community.centminmod.com/threads/xf-2-2-2-cannot-install-style.20812/
    Code:
    chown -R nginx:nginx /home/nginx/domains/yourdomain.com/public
    Oh, I just came across this: Nginx Rewrites for Xenforo Friendly Urls - CentminMod.com LEMP Nginx web stack for CentOS, AlmaLinux, Rocky Linux, which lists:
    Code:
    find /home/nginx/domains/newdomain.com/public/ -type f -print0 | xargs -0 chmod 0644
    find /home/nginx/domains/newdomain.com/public/ -type d -print0 | xargs -0 chmod 0755
    find /home/nginx/domains/newdomain.com/public/internal_data/ -type f -print0 | xargs -0 chmod 0777
    find /home/nginx/domains/newdomain.com/public/data/ -type f -print0 | xargs -0 chmod 0777
    find /home/nginx/domains/newdomain.com/public/internal_data/ -type d -print0 | xargs -0 chmod 0777
    find /home/nginx/domains/newdomain.com/public/data/ -type d -print0 | xargs -0 chmod 0777
    chmod 0755 /home/nginx/domains/newdomain.com/public
    So I'm guessing that if someone put 777 on js and src that's not safe and they should rerun the commands above, and we have to manually delete addon files?


    EDIT:
    Oh, I think the 777 vs 755 may not have mattered at all for not being able to delete files. It looks like the "chown -R nginx:nginx" command is adequate for that. And the issue stems from logging into Filezilla with 'root' user to upload addons.
     
    Last edited: Jun 17, 2025
  2. Jon Snow

    Jon Snow Active Member

    917
    188
    43
    Jun 30, 2017
    Ratings:
    +293
    Local Time:
    2:52 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    Why not install your addons through the XF Admin Panel so you don't have to log in as root to upload the files?
     
  3. MaximilianKohler

    MaximilianKohler Member

    214
    9
    18
    Jun 23, 2023
    Ratings:
    +39
    Local Time:
    10:52 PM
    Hmm, I never considered that. I just tested the option and I get this message:
     
  4. Jon Snow

    Jon Snow Active Member

    917
    188
    43
    Jun 30, 2017
    Ratings:
    +293
    Local Time:
    2:52 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    Add the line to src/config.php and you're good to go. Centminmod has everything installed for it already.
     
  5. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:52 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Yeah more like Getting Started Guide step 2 Getting Started Guide - CentminMod.com LEMP Nginx web stack for CentOS, AlmaLinux, Rocky Linux

    Posted it somewhere, but when you upload and unzip files I do this i.e. for Xenforo
    Code (Text):
    cd /path/to/zipfile
    unzip zipfile.zip
    cd zipfile/upload (whatever directory gets unzipped)
    chown -R nginx:nginx *
    \cp -af * /home/nginx/domains/yourdomain.com/public
    

    so for xenforo upload folder gets chown to nginx user/group and files get copied to web root where xenforo is
     
  6. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:52 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Definitely easier :)