XF 2.3 Had server issues, can't install addon updates.

philmckrackon

Well-known member
After a major hiccup on my server, directory and file permissions became whacked as well as many templates.
I cannot upgrade addons, my resources and media are not being displayed (they still exist) and if I finish running a cron that was running it errors out.
I rebuilt master data via cli and reset the file permissions or so I thought. Still getting errors. Im pretty sure the majority of the issues are permission related.
I know that since this happened that only new posts and users have been added.
I uploaded the old backup DB and temporarily switched to that and the gallary and downloads are back.
I need to take the user and post data and copy it from DB1 to DB2. I have phpMyadmin and SSH access. Does anyone know exactly what needs to be copied and help with the exact procedure?

Thanks,
 
These commands will reset directory and file permissions.
You will need to edit them to the correct owner and path.

Take a backup first.

Code:
chown -R owner:owner /var/www/path
find /var/www/path -type d -exec chmod 775 {} +
find /var/www/path -type f -exec chmod 664 {} +
chmod 0777 -R /var/www/path/data/ /var/www/path/internal_data/
 
These commands will reset directory and file permissions.
You will need to edit them to the correct owner and path.

Take a backup first.

Code:
chown -R owner:owner /var/www/path
find /var/www/path -type d -exec chmod 775 {} +
find /var/www/path -type f -exec chmod 664 {} +
chmod 0777 -R /var/www/path/data/ /var/www/path/internal_data/
Thanks @Paul B
Do you know about how to copy copy users and posts from DB1 to DB2?
 
@Paul B
You can't just selectively copy data from one database to another.

You would need a custom script to do that as there are a lot of interconnected tables.
OK, @Paul B after executing
Code:
chown -R ***:*** /home/******/public_html/community2;
find /home/******/public_html/community2 -type d -exec chmod 775 {} +;
find /home/******/public_html/community2 -type f -exec chmod 664 {} +;
chmod 0777 -R /home/******/public_html/community2/data/ /home/******/public_html/community2/internal_data/;

Still have.
add1.webp

Thouhts? I verified the permissions.
 
If the perms are correct then it's due to the wrong web server user.
Hmm. Not sure how that can be. I only have one and I checked the directories and files. Just to be sure I ran
Code:
find . ! -user je**** -o ! -group je**** -exec ls -ld {} \;
find . -type d ! -user je**** -o ! -group je**** -exec chown je****:je**** {} \;
The site functions but I just cannot update an addon. Should I try root?
 
Are you sure the user and group is correct? Normally you should use the user the webserver is running under (normally "www-data" or "nginx").

Scipt I normally use:
Code:
find /home/nginx/domains/domain.com/public/ -type f -print0 | xargs -0 chmod 0644
find /home/nginx/domains/domain.com/public/ -type d -print0 | xargs -0 chmod 0755
find /home/nginx/domains/domain.com/public/internal_data/ -type f -print0 | xargs -0 chmod 0777
find /home/nginx/domains/domain.com/public/data/ -type f -print0 | xargs -0 chmod 0777
find /home/nginx/domains/domain.com/public/internal_data/ -type d -print0 | xargs -0 chmod 0777
find /home/nginx/domains/domain.com/public/data/ -type d -print0 | xargs -0 chmod 0777
chmod 0755 /home/nginx/domains/domain.com/public
chown -R nginx:nginx /home/nginx/domains/domain.com/public
 
Back
Top Bottom