I can't tell you what you did wrong because I don't know what you did. The message said it's not a valid directory. What did you enter for the directory? Are you sure it exists?
From the command line you should be able to put in:
cd <whatever you entered into that field>
From anywhere.
I put both the url link ( mysite / data / ) as well probe with home / htdocs / data) and always tells me the same. The folder has 777 permissions and the folder is created outside the directory elgg therefore the error which is not
Creation of the data directory outside the Elgg install directory (actually outside the document root directory) is correct. If the data directory is outside document root (as it should be) setting permissions to 777 is also correct.
What's wrong is to enter any kind of url. You need to provide the full, absolute path to the data directory on the filesystem of the server instead. If it worked for the Elgg 1.9 installation it should work for the Elgg 2.2 installation in the same way. So, check the path you entered for Elgg 1.9 and enter the corresponding path to the data directory of Elgg 2.2.
If it still fails to work with the correct filepath (and there's only one correct path possible) the php config on your server might use the open_basedir directive in php.ini that determines which directories are accessible. If open_basedir is used, the data directory of your Elgg 1.9 installation might be included in the list of allowed directories whereas the new data directory for Elgg 2.2 would not be included.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.