Page 1 of 1

Changed servers - premissions and "undefined variable issues"

Posted: Fri Nov 16, 2007 7:34 pm
by Zack
Hi all,

I'm new to CMSMS. I recently moved my working website from a shared sever to a dedicated virtual server(Apache). Ever since a few minor issues keep cropping up.

The most common one is to do with the modules: all of them are listed with "change permission" link and "cannot remove" warning. I read about it in the forum here and it was suggested that permissions for folders/subfolders and files must be changed to 777. I could do that but am just wondering whether this pose a security risk. I tried installing some of the modules but it did not seem to work.

The other issues is with error warnings such as on:

Frontend User Management "user properties" tab:

Notice: Undefined index: varchar in /var/www/vhosts/dicksontesting.com/httpdocs/modules/FrontEndUsers/function.admin_propertiestab.php on line 55

Notice: Undefined index: varchar in /var/www/vhosts/dicksontesting.com/httpdocs/modules/FrontEndUsers/function.admin_propertiestab.php on line 55

Notice: Undefined index: varchar in /var/www/vhosts/dicksontesting.com/httpdocs/modules/FrontEndUsers/function.admin_propertiestab.php on line 55

Notice: Undefined index: varchar in /var/www/vhosts/dicksontesting.com/httpdocs/modules/FrontEndUsers/function.admin_propertiestab.php on line 55

Notice: Undefined index: varchar in /var/www/vhosts/dicksontesting.com/httpdocs/modules/FrontEndUsers/function.admin_propertiestab.php on line 55



Form Builder "upload file" field:

Notice: Undefined variable: adv in /var/www/vhosts/dicksontesting.com/httpdocs/modules/FormBuilder/classes/FileUploadField.class.php on line 99

I searched the forum for this particular problem but could not find any posts. Has anybody experienced similar issues and found solutions to them? Any help will be greatly appreciated.

I'm using the latest 1.2 version of CMSMS. Thanks to CMSMS team for the great tool and a very helpful support community.

Zack

Re: Changed servers - premissions and "undefined variable issues"

Posted: Sat Nov 17, 2007 3:36 am
by cubix
how did you 'move' your site? ftp client?

Re: Changed servers - premissions and "undefined variable issues"

Posted: Sat Nov 17, 2007 4:09 am
by kermit
Zack wrote: The most common one is to do with the modules: all of them are listed with "change permission" link and "cannot remove" warning. I read about it in the forum here and it was suggested that permissions for folders/subfolders and files must be changed to 777. I could do that but am just wondering whether this pose a security risk. I tried installing some of the modules but it did not seem to work.
php must have write access to the ./modules directory and the directories & files that make up added (third-party) modules in order to use ModuleManager to install/remove modules. in your case, php is probably running as the webserver user.

it sounds like you copied the site using FTP, which then assigns ownership of uploaded files and created directories to the user account, not the webserver... and unless you make those directories and files world-writable, ModuleManager won't do a thing with them except complain about permissions.  if you've got root access to the server, you could chown the third-party module files and directories to the webserver user instead.

and yes, anytime you make anything world-writable, it can be an added security risk... that is reduced somewhat if you're running in a dedicated (or in your case, isolated) environment... you don't have hundreds or thousands of other users on the same server that you have to worry about.. and wonder if they're running updated, secured applications or if they are perhaps hax0rs themselves...

Re: Changed servers - premissions and "undefined variable issues"

Posted: Wed Nov 21, 2007 6:05 pm
by Zack
Thanks Kermit for your detailed reply. Yes, I FTPed the files. I've root access to the server and I'll try making changes as you suggest.
I've a further question: What is the alternative to FTPing files when you move servers? Is there a way we can move cmsms sites without creating the modules permission issue.

thanks once again.

Zack

Re: Changed servers - premissions and "undefined variable issues"

Posted: Wed Nov 21, 2007 7:07 pm
by Pierre M.
Hello Zack,
Zack wrote: What is the alternative to FTPing files when you move servers? Is there a way we can move cmsms sites without creating the modules permission issue.
Try this :
-backup database and files. And may be some settings as well.
-restore the database at the new location.
-prepare the new location as usual with chmod etc
-run the installer without checking the box for creating database objects (hence using the existing one).
-and run optional modules install.
Hopefully all will be done by the webserver (under its permissions) and not the FTP tool.

Pierre M.

Re: Changed servers - premissions and "undefined variable issues"

Posted: Wed Nov 21, 2007 10:47 pm
by kermit
Zack wrote: Thanks Kermit for your detailed reply. Yes, I FTPed the files. I've root access to the server and I'll try making changes as you suggest.
I've a further question: What is the alternative to FTPing files when you move servers? Is there a way we can move cmsms sites without creating the modules permission issue.
it's not a 'moving servers' issue; it's simply a file permissions issue.. and it doesn't matter if it's a new install or a migrated one.

whoever (or whatever) is maintaining the files (adding, deleting, etc) must have write access to them... depending upon server configuration, that could be only your user account (e.g. php/cgi runs as your user) or both webserver and your user account (e.g. mod_php runs as webserver). a bit more detailed explanation is under 'file permissions' heading of this post (a cpanel 11 migration checklist i whipped up).

personally, i 'get around' the problem by running php5 as cgi, which runs as the user account. files which need to be writable by cmsms and readable by apache need no higher than 604 (705 for their directories) permissions; and config.php can be 600 or 400.

Re: Changed servers - premissions and "undefined variable issues"

Posted: Fri Nov 23, 2007 7:47 pm
by Zack
Pierre, kermit

I'll try your suggestions and report here how it goes.

Thanks for you responses. Much appreciated.