News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How do you copy a forum to a test environment without losing the permissions?

Started by Yikesfactor, November 20, 2018, 11:51:16 PM

Previous topic - Next topic

Yikesfactor

I need to set up a test environment for my forum, but each time I've tried copying the existing one, all the permissions get lost, and nothing runs.

Anyone know how to do this?

A new install is not an option, as no matter how its done, things wont be exactly the same. (mods change things, and differently depending on what order you do things in.)

Version 2.0.15

Used phpBB before, new to SMF.

I know enough to be dangerous.
Breaking things is my specialty.

Kindred

Copy the files
Copy the database
Upload and run repair_settings.php to change the paths and database settings.
Save
Rerun repair_settings.php to correct the second set of paths and urls
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Aleksi "Lex" Kilpinen

SMF permissions are in the database, file permissions depend on your hosting and what you use to transfer the files.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Yikesfactor

Quote from: Kindred on November 20, 2018, 11:54:42 PM
Copy the files
Copy the database
Upload and run repair_settings.php to change the paths and database settings.
Save
Rerun repair_settings.php to correct the second set of paths and urls

Doesn't work. Repair_settings wont run either. Nothing runs. Every single file is set to read only as far as I can tell.
Version 2.0.15

Used phpBB before, new to SMF.

I know enough to be dangerous.
Breaking things is my specialty.

Aleksi "Lex" Kilpinen

That sounds like a badly configured host to me, there isn't much you can do about that other than try a different method of uploading the files. Or making sure you actually have PHP installed.
Quote from: Aleksi "Lex" Kilpinen on November 20, 2018, 11:57:28 PM
file permissions depend on your hosting and what you use to transfer the files.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF


Yikesfactor

Quote from: Looking on November 21, 2018, 04:54:22 AM
How are you exactly copying or exporting the files?

Cpanel File Manager.

Any other way takes too long, and means double shifting.
Version 2.0.15

Used phpBB before, new to SMF.

I know enough to be dangerous.
Breaking things is my specialty.


Sir Osis of Liver

Quote from: Yikesfactor on November 20, 2018, 11:51:16 PM
all the permissions get lost, and nothing runs.

Those are two different problems.  If the forum doesn't run, how do you know permissions are lost?  Or are you referring to file permissions?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Yikesfactor

File permissions, yes.

I checked them manually. Every single file was reset permission wise by the File Manager copy.
Version 2.0.15

Used phpBB before, new to SMF.

I know enough to be dangerous.
Breaking things is my specialty.

Sir Osis of Liver

File permissions are not saved in database, they're not carried over to new install.  It's strictly a server function.  You need to set directories 755, files 644.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Yikesfactor

That's the basis of the whole question.

How do I copy the whole forum over without losing the file permissions in the first place?

Changing everything afterwards would be a nightmare.
Version 2.0.15

Used phpBB before, new to SMF.

I know enough to be dangerous.
Breaking things is my specialty.

Sir Osis of Liver

Quote from: Sir Osis of Liver on November 21, 2018, 11:16:27 AM
It's strictly a server function. 

File permissions are not part of the forum.  It's not difficult to change permissions with FileZilla.  There are options to Recurse into subdirectories, Apply to all files and directories, Apply to files only, Apply to directories only.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

you need to talk to your host... because it sounds like they have a serious misconfiguration (since, having done this sort of thing over 100 times, I have never encountered such an issue with file copies)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Yikesfactor

Quote from: Sir Osis of Liver on November 21, 2018, 11:34:54 AM
What are the dir/file permissions on the copy install?

I dont remember, but appeared to be read only on every single file in every single directory.
Version 2.0.15

Used phpBB before, new to SMF.

I know enough to be dangerous.
Breaking things is my specialty.

Yikesfactor

Quote from: Kindred on November 21, 2018, 11:30:37 AM
you need to talk to your host... because it sounds like they have a serious misconfiguration (since, having done this sort of thing over 100 times, I have never encountered such an issue with file copies)

Probably is a question which should be asked. Thanks.
Version 2.0.15

Used phpBB before, new to SMF.

I know enough to be dangerous.
Breaking things is my specialty.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Yikesfactor

Quote from: Sir Osis of Liver on November 21, 2018, 10:08:40 PM
Do you use FileZilla?

I have it now, but FTP on my main computer dropped dead, and I still cant work out why. I normally use Ws_ftpv12.

But downloading and then uploading is the slow bandwidth intensive option. I'm not on superfast internet here in Oz. Our broadband is slower then the US's WiFi. So copy on the host end makes more sense. Costs me nothing, including time.
Version 2.0.15

Used phpBB before, new to SMF.

I know enough to be dangerous.
Breaking things is my specialty.

Sir Osis of Liver

You can upload files with cpanel filemanager, and change permissions with FZ.  Must be a way to do it in cpanel, but never had to, FZ is easier.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: