What EasyMOD Move/Write methods do you use?

Want to share what MODs you've gotten to work with EM? Happy about all the time your're saving? Want to say "thanks"? Here's the place.
Forum rules
DO NOT give out any FTP passwords to anyone! There is no reason to do so! If you need help badly enough, create a temporary FTP account that is restricted to only the files that you need help with and give the information for that. Giving out FTP information can be very dangerous!
Locked
wGEric
Registered User
Posts: 521
Joined: Wed Jun 11, 2003 2:07 am
Contact:

What EasyMOD Move/Write methods do you use?

Post by wGEric »

I'm trying to collect some stats on what people use in EasyMOD. If everyone could please vote in these two Polls that would be great.

http://www.phpbb.com/phpBB/viewtopic.php?t=315796" target="_blank
http://www.phpbb.com/phpBB/viewtopic.php?t=315793" target="_blank

If you don't have an account at the main site, go ahead and reply here with what you would vote for. Thanks.
Eric

User avatar
-=ET=-
Registered User
Posts: 214
Joined: Mon May 26, 2003 1:35 pm
Location: France

Re: What EasyMOD Move/Write methods do you use?

Post by -=ET=- »

The pb of these survey is that IMO many people (not all I know ;) ) who use EM use in fact "Server" & "Buffer and FTP", as well as "Copy" & "Automated FTP". I mean most people use EM on their PC as well as on their forum online and both by the classic (normal) methods :)
So IMO the % will not be correct.

Perhaps you should have asked directly...
wGEric wrote: If you use Manually Load, Execute script, On Screen or Download, I would like to know why. Is it because you don't have FTP access or server access? If EasyMOD had SFTP or SSH as methods, would you use those instead?
And to answer your question, from what I've seen doing a lot of EM support in France, it's very often simply because both of the classical methods doesn't work when the forum is on a host server!
And the reason why is mostly because for security reason the host...
- has disabled fsockopen()
- has disabled all the php FTP functionalities
- has disabled all the port, including the 21, except the 80 for MySQL use
http://www.spellingcow.com/phpBB2/viewtopic.php?t=299" target="_blank
- etc, etc.
Eternal newbie

wGEric
Registered User
Posts: 521
Joined: Wed Jun 11, 2003 2:07 am
Contact:

Re: What EasyMOD Move/Write methods do you use?

Post by wGEric »

My main reason for asking that question is to see if SSH or SFTP was avaliable, would they use it.

Do you know if the SSH2 extension is installed on that french host? What about if exec(), system(), passthru() and other functions like those are disabled on that host? Is safe mode on? Is it a *nix host and not windows?
Eric

User avatar
-=ET=-
Registered User
Posts: 214
Joined: Mon May 26, 2003 1:35 pm
Location: France

Re: What EasyMOD Move/Write methods do you use?

Post by -=ET=- »

phpinfo by PM ;)
Eternal newbie

markus_petrux
Registered User
Posts: 376
Joined: Fri Jun 18, 2004 10:58 pm
Location: Girona, Catalunya (Spain)
Contact:

Re: What EasyMOD Move/Write methods do you use?

Post by markus_petrux »

Maybe when things are so odd, EM could generate a ZIP (or something) with all files that need to be uploaded plus a db_install.php script to apply DB changes if necessary. Like building an automatic installation package.

User avatar
Nux
Registered User
Posts: 943
Joined: Tue Jun 14, 2005 5:09 pm
Location: 3cities, Poland
Contact:

Re: What EasyMOD Move/Write methods do you use?

Post by Nux »

I agree with markus - the best option would be to give all files in correct directory tree to copy to a server. Zip or Gzip would be nice :). It could even be less complicated then new versions of copy/move methods (people usually don't know what to choose, anyway ;)).

wGEric
Registered User
Posts: 521
Joined: Wed Jun 11, 2003 2:07 am
Contact:

Re: What EasyMOD Move/Write methods do you use?

Post by wGEric »

markus_petrux wrote: Maybe when things are so odd, EM could generate a ZIP (or something) with all files that need to be uploaded plus a db_install.php script to apply DB changes if necessary. Like building an automatic installation package.
Thats what it looks like we will have to do since all of the methods I was thinking of aren't going to work. We'll need to see if they have temporary write access. I guess that doesn't really matter since they could create a folder that is 777 and set that as the temporary write path.
Eric

markus_petrux
Registered User
Posts: 376
Joined: Fri Jun 18, 2004 10:58 pm
Location: Girona, Catalunya (Spain)
Contact:

Re: What EasyMOD Move/Write methods do you use?

Post by markus_petrux »

I guess, that would be a minimum minimorum! ...if someone doesn't have rights to write files somewhere, then why use PHP? 8O :lol:

Strange I've never read about problems writing the EM backups.

User avatar
-=ET=-
Registered User
Posts: 214
Joined: Mon May 26, 2003 1:35 pm
Location: France

Re: What EasyMOD Move/Write methods do you use?

Post by -=ET=- »

markus_petrux wrote: Maybe when things are so odd, ...
I wanted to see your reaction first but you know what?
Surprisingly, even if it's GNU/Linux server (cf phpinfo) and despite all their security settings the Server/Copy method works!!! 8O 8O 8O
lol :mrgreen:

I discover that 2 months ago.
Unfortunately I'm not able to say why, but the point is it works.
EM installer v0.2.1a wrote: phpBB version: 2.0.17
Working Dir: /var/www/free.fr/7/0/xxxxxx/forums/admin/mods/easymod
Install Step: 4
Mode: debug
The Error wrote: No error.
Permissions: (including system errors)

read access :: OK
write access :: OK
root path write :: OK
chmod access :: OK
unlink access :: OK
mkdir access :: OK
tmp path write :: OK
FTP extension :: module not loaded
Safe Mode :: ON
copy access :: OK



Recommendations:
write: server
move: copy

Selected settings:
write: server
move: copy
ftp dir: /
ftp host: localhost
ftp port: 21
ftp debug: false
ftp ext: fsock
ftp cache: false

CWD Listing:

Code: Select all

drwx------ . 
drwx------ .. 
drwx------ languages 
-;rw-r--r-- easymod_install.php 
drwx------ em_includes 
-;rw-r--r-- post_process.sh 
-;rw-r--r-- easymod_display_functions.php 
drwxr-xr-x EM_test_dir 
-;rw-r--r-- easymod.gif 
-;rw-r--r-- post_process.bat 
drwx------ includes 
drwx------ templates 

Not testing FTP since it is not being used.
wGEric and Markus, you may have access to my test account by PM if you want to do your own tests ;)
wGEric wrote: ...since they could create a folder that is 777 and set that as the temporary write path.
Nope!
CHMOD is disabled too...
http://faq.free.fr/?q=952" target="_blank
By default files are created in 644, and directory in 700.
Last edited by -=ET=- on Fri Aug 19, 2005 10:57 pm, edited 1 time in total.
Eternal newbie

wGEric
Registered User
Posts: 521
Joined: Wed Jun 11, 2003 2:07 am
Contact:

Re: What EasyMOD Move/Write methods do you use?

Post by wGEric »

If server works, then I'd guess that the server is running under the same user as what the owner of the files are (or root which I doubt). If you want to check, run this function for me and tell me what the output is (either var_dump or var_export should work).

Code: Select all

function test(&$debug, $name = 'server')
		{
			global $phpbb_root_path, $phpEx, $board_config;
			
			$debug[$name]['allowed'] = true;
			
			// check write access
			if ( $fout = @fopen('EM_test.txt', 'w') )
			{
				@fwrite($fout, "EM can write!\n");
				@fclose($fout);
				unset($fout);
		
				$debug[$name]['write'] = true;
			}
			else
			{
				$debug[$name]['write'] = false;
				$debug[$name]['allowed'] = false;
			}
			
			// check root write access
			if ( $fout = @fopen($phpbb_root_path . 'EM_test.txt', 'w') )
			{
				@fwrite($fout, "EM can write!\n");
				@fclose($fout);
				unset($fout);
				@unlink($phpbb_root_path . 'EM_test.txt');
		
				$debug[$name]['write_root'] = true;
			}
			else
			{
				$debug[$name]['write_root'] = false;
				$debug[$name]['allowed'] = false;
			}
			
			// check chmod access
			if ( @chmod('EM_test.txt', 0777) )
			{
				$debug[$name]['chmod'] = true;
			}
			else
			{
				$debug[$name]['chmod'] = false;
				$debug[$name]['allowed'] = false;
			}
		
			// check deleting files
			if ( @unlink('EM_test.txt') )
			{
				$debug[$name]['delete'] = true;
			}
			else
			{
				$debug[$name]['delete'] = false;
				$debug[$name]['allowed'] = false;
			}
			
			// check making directories
			// if access to rmdir's isn't there and the file already exists, assume we have access to make directories
			if ( @mkdir('EM_test_dir', 0777) || file_exists('EM_test_dir') )
			{
				$debug[$name]['mkdir'] = true;
				@rmdir('EM_test_dir');
			}
			else
			{
				$debug[$name]['mkdir'] = false;
				$debug[$name]['allowed'] = false;
			}
			
			// check writing temp files
			$tmp = true;
			if($tmpfname = @tempnam('/tmp', 'em_'))
			{
				@unlink($tmpfname);
				
				if ( $fp = @fopen($tmpfname, 'w') )
				{
					// remember to clean up!
					@fwrite($fp, "EM TEST\n");
					@fclose($fp);
					@unlink($tmpfname);
		
					$debug[$name]['tmp_write'] = true;
				}
				else
				{
					$tmp = false;
				}
			}
			else
			{
				$tmp = false;
			}
			
			if ( !$tmp )
			{
				$debug[$name]['tmp_write'] = false;
				$debug[$name]['allowed'] = false;
			}
			
			// check safe mode
			if ( @ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'on' )
			{
				$debug[$name]['safe_mode'] = false;
				$debug[$name]['allowed'] = false;
			}
			else
			{
				$debug[$name]['safe_mode'] = true;
			}
			
			return;
		}
Eric

Locked