I'm trying to remove sample data (Welcome screen and everything else) from my Liferay server.
I tried to:
remove all directories from the webapps directory except ROOT directory
create new (blank) portal-ext.properties in ROOT/WEB-inf/classes (there was no portal-ext.properties file)
search via Google :)
Nothing of the above helped. Thank you for your advices.
You might have configured a database, or are using the built-in demo hsql database. This holds all the regular data. If you've configured Liferay to access another database either remove the tables from that database or point to another one. There's also the document library that holds documents and images (the binary content). By default they all live in the data directory, on the same level as your tomcat directory (assuming you use a bundle)
A new blank portal-ext.properties will not help you, as it overrides all the standard values defined in Liferay. If there's no content, you're using all the default. And the file should rather be in ${liferay-home}, e.g. the directory that also has the tomcat directory in a bundle.
As you've removed all content and bundled webapplications anyway, you can also just install a new bundle in another directory and use it, pointing it to a new database.
Related
I used the configs/dev/local/portal-ext.properties file and this contains:
# Hypersonic
#
jdbc.default.driverClassName=org.hsqldb.jdbcDriver
jdbc.default.url=jdbc:hsqldb:c:/data/hsql/lportal
jdbc.default.username=
jdbc.default.password=
Still when I add content to the site none of the lportal files have been changed in the c:/data/hsql/ folder?
The default configuration uses Hypersonic and creates the lportal folder inside LIFERAY_HOME/data path, see portal.properties
But in some Liferay 7 testing I realized that lportal files are not written to file until you stop Liferay.
So try stoping Liferay and check the files after that.
A last warning: Hypersonic is not recommended for production use. My advice: never use Hypersonic, install Postgresql or MySQL and configure Liferay to connect to them.
I'm working with a legacy application that's using Liferay 4. They have a bunch of files on display using the Documents and Media portlet. I can see all of these files listed but when I go to view them or download them I get errors. I even tried going into the Admin Console and got the same issue. I can see all the files listed but when I go to download them I get errors.
There are some recent files from last month that were uploaded and those files are able to be viewed. So I get the feeling something happened a few months ago that deleted these files. From what I've gathered the files are stored on the server and the file information is stored on the database. If that's true it would explain why the files are being listed but not view-able/downloadable; if they were deleted from the server but their meta-data remains in the database allowing them to be listed.
According to this page, https://www.liferay.com/community/forums/-/message_boards/message/6387093, the files should be under data/document-library but I believe that's only for Liferay 6.
So where are these files being stored for Liferay 4?
Default settings for a portal come from a file Portal.properties. For Liferay 4, I found this documentation:
http://content.liferay.com/4.2/doc/installation/liferay_4_customization_guide/multipage/ch01s02.html
It states:
#
# Set the directories where documents are stored. This is now deprecated
# because documents are stored in Jackrabbit.
#
dl.root.dir=/home/liferay/documentlibrary/root/
dl.version.root.dir=/home/liferay/documentlibrary/vroot/
and
##
## JCR
##
jcr.initialize.on.startup=false
jcr.workspace.name=liferay
jcr.node.documentlibrary=documentlibrary
jcr.jackrabbit.repository.root=/home/liferay/jackrabbit
jcr.jackrabbit.config.file.path=${jcr.jackrabbit.repository.root}/repository.xml
jcr.jackrabbit.repository.home=${jcr.jackrabbit.repository.root}/home
jcr.jackrabbit.credentials.username=none
jcr.jackrabbit.credentials.password=none
In newer versions of Liferay, the defaults can be overridden in the file portal-ext.properties or in the database.
You might look for hints at these places.
Thank you everyone in advance... ^^;
My manager asked me to migrate the installed OpenAM (already used) to another machine (newly obtained).
I tried to migrate it by file level.
(.openamcfg folder, openam folder, tomcat whole folder, ...)
But, after file migration... first access to /openam, it showed initial page(wizard) again. (no using installed configurations)
So, I should do first step. (amadmin password setting, and so on...)
Hmm... Is there any solution for pre-installed OpenAm instance migration?
If No, I can tell her there's no migration way.
Migrating the files should be enough, however you must make sure that :
The .openamcfg folder is in Tomcat's home folder
The file inside the .openamcfg folder contains a valid path to the openam folder
The .openamcfg and openam folders can be read/write by the user who runs the Tomcat service
The webapp context (the part of the URL after the server's IP address, typically /openam) stays the same
Also, when you copy the files, you must first properly stop the Tomcat service, especially if you use OpenAM's embedded datastore.
Where does the portal-ext.properties file go before the liferay war file is deployed?
It's typically the folder where your appserver resides. if I remember correctly, glassfish typically has two nested "glassfish" folder - there it'd be within the first.
The best way to explore that yourself (and to be sure) is to put your portal-ext.properties in every location you guess it might be, then startup the server and examine the log. There it mentions which file is being read.
Also, AFAIK portal-ext.properties will also be read from the user's home directory if found there - careful, when you run a server like glassfish, that might be a different user account than your own.
domains/domain1/applications/liferay-portal/WEB-INF/lib/portal-impl.jar >>> /content/
you will find all translation files there.
So, I decided to try to break my website...I googled my site by typing in site:mysite.com/whatever and behold, all of the users uploaded files were available for view under a specific directory.
What kind of script/ counter measure should I use to block these files from being viewed? I already have a script that checks the path and the logged in status, however this doesn't seem to be working. I've looked all over for solutions...but I can't quite find one. I'm using ColdFusion 8.
This isn't a ColdFusion issue so much as a web server configuration issue.
You should either:
configure your web server not to show a directory of files when using a URL without a filename (e.g., http://www.example.com/files/)
drop a blank default web document (index.html, index.htm, default.htm, index.cfm, whatever) into that directory so that it displays that document rather than the list of files. If you use index.cfm, it'll fire your Application.cfm/cfc in your file path and use whatever other security you've built.
(or, better, do both)
The best way to secure your file listings and the files themselves is to store them in another folder outside of the Web site root folder. You can then serve them up using CFDIRECTORY and CFCONTENT. The pages that display the files can check your access controls and only serve the files to those allowed to see them.