Learn about Centmin Mod LEMP Stack today
Register Now

Xenforo xenforo theme; best way to deal with permissions?

Discussion in 'Forum software usage' started by Andreas, Feb 17, 2022.

  1. Andreas

    Andreas New Member

    12
    0
    1
    Jan 20, 2022
    Ratings:
    +0
    Local Time:
    12:49 PM
    Hey There,

    after I have successfully installed xenforo & centminmod,
    I proceed to install a new theme for my forum.

    I have now the problem with the permissions.


    Is there an easy, convenient way to do that?


    I searched the forum and did not find a general answer to this;
    I mean, what commands to type in, or what chmod value exactly do I have to assign to the folders (?)

    Is nginx the webserver user? (do I have to assign ownership to nginx:nginx?)

    (btw: after installing the theme, do the permissions must stay like that,
    or can I switch them back / make the folders more safe again?)



    Thank you
     
    Last edited: Feb 17, 2022
  2. eva2000

    eva2000 Administrator Staff Member

    48,440
    11,102
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,281
    Local Time:
    8:49 PM
    Nginx 1.21.x
    MariaDB 10.x
    See https://community.centminmod.com/th...on-centmin-mod-123-09beta01-lemp-stack.16060/ and Getting started guide step 2 for permission which is dependent on how you uploaded the files
    Getting Started Guide

    For non-pure-ftpd uploaded files i.e SFTP uploads
    If you otherwise use pure-ftpd uploads, then the user group permissions are automatically set to correct nginx user and group
     
    Last edited: Feb 17, 2022
  3. Andreas

    Andreas New Member

    12
    0
    1
    Jan 20, 2022
    Ratings:
    +0
    Local Time:
    12:49 PM
    Hi George,

    I have found another good post from you, from 2020:
    https://community.centminmod.com/threads/xf-2-2-2-cannot-install-style.20812/

    "
    First backup your existing permissions for everything under /public with command below where yourdomain.com is your domain name
    Code (Text):
    Code:
    getfacl -R -L --absolute-names /home/nginx/domains/yourdomain.com/public > /home/nginx/domains/yourdomain.com/backup/backup-permissions-$(date +"%d%m%y-%H%M%S").acl

    if you need to restore this backed up permissions use
    Code (Text):
    Code:
    setfacl --restore=backup-/home/nginx/domains/yourdomain.com/backup/backup-permissions-XXXXXX-XXXXXX.acl

    where XXXXXX-XXXXXX is the day-month-year-hr-min-sec timestamp from the above backup command

    Then chown user and group permissions recursively for all directories and files below /public would take care of ownership of files
    Code (Text):
    Code:
    chown -R nginx:nginx /home/nginx/domains/yourdomain.com/public

    That should take care of the user/group permissions but you still need properly permissions for directory and files
    "

    Is this still valid?

    I think this is a good way to save old permissions,
    and then change to new ones.

    Thanks
     
  4. eva2000

    eva2000 Administrator Staff Member

    48,440
    11,102
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,281
    Local Time:
    8:49 PM
    Nginx 1.21.x
    MariaDB 10.x
    Yup that works fine