Loading...
 
Skip to main content

Architecture / Installation


document permissions after changing server

posts: 11

Hi,

I migrated a Tiki Wiki site from one server to another and now it seems that the permissions don't work as for viewing documents (whether as an anonymous or registered user). I'm pretty sure they're there, but I can't read or dowload them. Could someboddy be of any help?

Here's the link to the site, with this specific page showing the problem: http://pleinmilieu.qc.ca/Rapports+d%27activit%C3%A9s

Many thanks,

Marc

posts: 215
It is Tiki 6.2? Are your files stored in a folder or in the database? If they are in a folder, did you move the folder over before or after running setup.sh? Running setup.sh should set the permissions for the folder correctly.
posts: 11
Yes, it's Tiki 6.2. Actually, I'm not sure where the files are located, is there a way I can find about that (sorry, I'm really a newbie with Tiki and I'm not the guy who built the site - I'm more of a Wordpress guy). And I moved the backup folder (site root folder) before performing anny command on the site.

posts: 215

Go to Admin Home, then File Galleries. There is a "Storage:" drop down that you can select either "Store in database" or "Store in directory" (The default setting is "Store in database").

If "Store in directory" is selected, then there is a "Path:" text box where you type in the directory name (ending with a /).

You will need to do this on your old server to see what it was set to, and then make the same setting in the new server. Your old server probably had it set to "Store in directory" and you will need the directory name and make sure that directory was migrated to the new server.

Tom

posts: 11

Ok, I found the path. The files are on the server but the weird thing is that in the directory, I can see files but they don't have a recognizable name or extension. I changed the path so it matches with the server, but now I figure I must run a setup command again (might wait until tomorrow before getting my hands dirty as I have little time left today).

Many thanks for your help, it's much appreciated!

Marc


posts: 215

The File Galleries directory files have coded names without extensions, so you found the correct directory.

Once the File Galleries Path is set, the setup.sh will set the correct permissions on the directory.

Tom

posts: 11

Sorry again for my lack of knowledge, but can I run setup.sh from Windows? Do I need a software like a jail shell to achieve this?

Thanks for your patience,

Marc


posts: 215

Hi Marc,

I didn't consider that you might be using Windows, sorry. I have never done Tiki on a windows server and I do not know the commands available. But you should be able to do it, others have.

Was the previous version also on a windows server? Can you check what the ownership was set to, and what permissions the previous system had on that folder?

Your Tiki will need write access to the folder. If the access isn't correct, the Admin -> Tiki Cache/System Admin page will have the message "(Directory is not writeable)" after the folder name.

When you request help for a problem, you should always give the Tiki Version and OS. See Rick's Blog post on how to ask good questions.

Tom

posts: 11

Hi Tom (and thank you so much for your help),

OK, here's the update. My own OS is Windows 7 but the server is a Linux one. The problem is that it's a shared one and it's seems they don't allow shell access (they use cpanel). Is there any way I can do this procedure, or am I screwed?

I checked all the permissions, from general to groups to objects and everything should be working fine, but the file links don't display anything. Also, I tried to transfer the files from the directory to the database and I get a message that a certain file could not be opened, so nothing gets done.

This looks bad, right?

Marc


posts: 215

I have not used Cpanel for quite a while so I used https://cpanel.net/demo/ to check. You can set the permissions using the File Manager, 755 is probably the correct permission setting for the folder. 644 should be OK for the files in the folder. The Owner and Group maybe should both be "apache"? Check what the other file's owner and group are.

You could use phpmyadmin to cross check the real file names with the Tiki assigned file names. Table tiki_files has one row for each file. There more columns than I will list, but these are the ones you can check to make sure the file is in the directory. Also, I will uses the first file on the page link you originally gave for an example of what should be in the fields. The first file on that page, "Rapport activité Plein Milieu 2009-2010.pdf" has a fileId of 121.
Columns:
fileId - value: 121
filename - value: Rapport activité Plein Milieu 2009-2010.pdf
path - This is the Tiki assigned name of the file in the directory.

Take the value of the "path" column and verify that a file of that name is in the directory you are working with.

Tom