Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to change anything after moving the cms directory
#1
To be on the safe side of things, I installed the cms system in the directory judo.ruhosting.nl/katja/GetSimple. After everything was working, I moved the directory to judo.ruhosting.nl. Not everything was working, so my brother performed a deep-search to remove the old directory and to refer it directly to the root of the website.

Now that I/we have done this, we cannot make anymore changes on the website. If I make a change, it cannot be saved. The permissions of the folders are okay though. Does anyone know how to fix this? I'd hate to have to go through the trouble of having to reinstall everything. Any help would really be appreciated.

Thanks a lot for reading this and for thinking of a solution. If you need any more information, please feel free to ask.
Reply
#2
go to the settings page, and make sure the base url has been set to your new location.

Mike.
My Github Repos: Github
Website: DigiMute
Reply
#3
n00dles101 Wrote:go to the settings page, and make sure the base url has been set to your new location.

Mike.
That has been done since I changed the directory.
Reply
#4
Look in...

data/other/website.xml

...and edit what is necessary.

However, your brother probably tampered with a core file.
I would suggest backing up your data and doing a fresh install.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#5
data/other/website.xml is correct, didn't need a thing to edit.

How do I go about backing up? Just copy everything in /data? Or is there an option that I overlooked?
Reply
#6
backup /data and your /theme if you've made edits.
My Github Repos: Github
Website: DigiMute
Reply
#7
I believe I recognise this problem and know why it happens.

The XML files created for storage by the CMS are created with such rights on the server that only the “owner” can edit, in this case being the CMS. When you move them to a new directory you become the owner meaning the CMS can’t edit existing pages anymore, as the XML files are only accessible by the owner.

CHMOD all your data files to 777, giving every script permission to write to it, and your CMS will be able to access it again.

This has always worked for me, so I would say this fixes the problem. My explanation might be completely wrong though, someone with more server experience and knowledge on CHMOD and file permissions could take a shot at it if they want.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#8
Zegnåt Wrote:I believe I recognise this problem and know why it happens.

The XML files created for storage by the CMS are created with such rights on the server that only the “owner” can edit, in this case being the CMS. When you move them to a new directory you become the owner meaning the CMS can’t edit existing pages anymore, as the XML files are only accessible by the owner.

CHMOD all your data files to 777, giving every script permission to write to it, and your CMS will be able to access it again.

This has always worked for me, so I would say this fixes the problem. My explanation might be completely wrong though, someone with more server experience and knowledge on CHMOD and file permissions could take a shot at it if they want.

That didn't work either..
Reply
#9
CHMOD 777 on data didn’t work? That is very odd.

Do you get any specific errors? What does the GetSimple health report say?
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#10
Zegnåt Wrote:CHMOD 777 on data didn’t work? That is very odd.

Do you get any specific errors? What does the GetSimple health report say?
No specific errors. I just can't change a thing.

Health report? How do I get or do that?
Edit: if that's the health check:

It gives me a blank:
[Image: Capture.PNG]
Reply
#11
You can find it under support, it’s the second link.

[Image: Z7h]

Edit:

That doesn’t look great…
I’d suspect to at least see the first few items, as these are also tested on install:

[Image: Z7t]

Very weird, as a blank health check would point to a fault somewhere in the main GS code, not just a mistake on permissions. Maybe there is something more wrong than just not being able to edit files.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#12
Zegnat,

Most LAMP setups have PHP scripts ran as Apache using the httpd command. They also have a control panel that creates an owner for that domain, subdomains, and any folders within. So, all files and folders within an account have one owner.

CHMOD refers to the access level you are giving the files in their directories. If you CHMOD 777, then you allowing full access to the files and folders. CHMODing a file to 777 is dangerous, and technically CHMODing a folder is as well, however, it depends on what you store in that folder. If you CHMOD an image uploads folder to 777, then it's not a big deal. If you CHMOD a settings folder to 777, then your setting yourself up for an attack.

After rereading their post, it does appear like a problem with writing the file and not reading the files. So, if the data folders permission of 755 doesn't work, 777 would allow writing access from the admin panel. Then past that, make sure the files in the data directory have the correct file permissions as well.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#13
Why didn't you move the admin panel as well?
Looking at your image you didn't do this.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#14
Gosh, I feel so silly now! I only set the folder data to 777 instead of the subfiles and subdirs too. After doing a chmod 777 -R it works again.

Is it safe to leave it at this permission?

Thank you so much for thinking about this and helping everybody!
Reply
#15
755 would be optimal, but every server has a different security setup.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#16
These days CHMOD 777 is actually quite safe. But as internet54 said, sometimes it can lead to certain problems.

I still do not understand why the files need CHMOD’ing after being moved, maybe getting to the bottom of this would be a lot better. You can try editing it with the admin panel now that you can and then put the permissions back to how they were (be sure to edit every single file!). Can’t say whether this will work though.

Otherwise if you want to be protective you’ll have to setup GS again, and copy over all the content. This is of course very annoying.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#17
Zegnåt Wrote:I still do not understand why the files need CHMOD’ing after being moved,

Depends on how the file is moved.
Downloading the files to a computer and then uploading them to a new location would erase their permissions.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#18
internet54 Wrote:
Zegnåt Wrote:I still do not understand why the files need CHMOD’ing after being moved,

Depends on how the file is moved.
Downloading the files to a computer and then uploading them to a new location would erase their permissions.
I must have done this like that. From now on I will use filezilla instead of ssh-shell as my ftp program. Smile This doesn't seem to mess with the permissions like ssh-shell does Smile
Reply
#19
internet54 Wrote:Downloading the files to a computer and then uploading them to a new location would erase their permissions.
So I guess downloading and uploading files, even though the CHMOD might be set the same, will then mess with the ownership which makes it inaccessible to the admin panel?

This sadly will mean that porting GetSimple from one server to a next is impossible unless you are prepared to put your data files with completely open (777) permissions. Something Chris might want to pick up.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#20
No, I will try and clarify...

If your website is running fine and you want to move it, NEVER DOWNLOAD IT to a computer and then upload it to a new folder. The files have permissions that were setup by Get Simple. When you download a file and upload it to a new folder, the server has no clue that your just moving an already existing file to another directory. So, when you upload a NEW file, the server gives that filetype extension a default CHMOD value. Most files and folders are 755, but many need 666 or 777 to allow full write access.

That is CHMOD. CHMOD = File Permissions ONLY, it has nothing to do with who controls the file (Owner).

Next...

CHOWN = File OWNERSHIP. Typically all files in a directory and it's sub directories are owned by the same person. You cannot change the ownership of a file unless you have SSH access. This is something that the majority of webmasters will never need to deal with.

So, there was NEVER a change in ownership. When chromis uploaded the files via FTP, the server CHOWNED the files as him being the owner. What messed up is the Read, Write, and Execute permissions on the files he uploaded as they were reset to default.

Chromis, SSH is the best, yet hardest way to work with files on a server. You must know command line or else it's nothing but confusing. Also, one wrong character in the command can cause data deletion. I've seen this happen many times. The EASIEST way to move files for most people is by using Filezilla. Don't download the files, but instead highlight all the files and folders you want moved and drag your highlighted items to the " .. " that appears above files and folders. Then click on the " .. " and you will see your files in that lower directory. Then just keep moving if necessary.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply




Users browsing this thread: 1 Guest(s)