Mount webdav/davfs in RedHat OpenShift - openshift

Is it possible to mount a webdav file system in OpenShift? I have ssh access, but no root access so I can't install davfs or actually mount anything. I just need access to a webdav folder from OpenShift, how can I do this?

OpenShift online does not currently support WEBDAV, you will need to use SFTP or SCP to upload/download files from your gear(s).

Related

mount google compute engine directory on local system

Can we mount google compute engine directory on local system using sshfs or any other alternative ?
Can we mount google compute engine directory on local system using sshfs or any other alternative ?
Sorry, i had to repeat question otherwise SOF was not allowing me to post question.
Yes you can mount mount google compute engine directory on local system using sshfs. You’ll need to first install FUSE and configure autofs or sshfs. Here is a guide you can look at to start this up.

Where is data directory in OpenShift 3?

Where data are stored which need a web service in OpenShift 3? Anyway how can I browser file system?
In OpenShift 3 there is no persistent storage provided by default. You will need to claim a persistent volume and then mount it at whatever directory you desire in the container for your application.
To view the contents of the directory, use oc rsh or the terminal window for a pod in the web console to get shell access, Then change to the directory to look in the directory.
To transfer files into the persistent volume, you can use the oc rsync command.
You can find a tutorial on transferring files in and out of container at https://learn.openshift.com

How can i install SMB Client on Openshift Gear

How can i install SMB Client on Openshift Gear
Actually i have successfully installed OwnCloud Using https://hub.openshift.com/quickstarts/4-owncloud
but the only problem is after installing the External storage support plugin it gives me hard warning Note: "smbclient" is not installed. Mounting of SMB / CIFS, SMB / CIFS using OC login is not possible. Please ask your system administrator to install it. so it clearly suggest that i need to install smbclient on the server which i cant install as i don't have sufficent privilage on server.
Can anybody help? Any cartrigde or any way to achieve it
SMB is not enabled for users to use on OpenShift online, and you are correct that users do not have the required permissions to install it. unfortunately there is really no way around this. If you need to use SMB Client, you really need your own Virtual Machine that you have root access to to install whatever software you need.

Amazon AWS Cloudformation JSON template to assign the LAMP www/html folder permissions to ec2-user

I have created a JSON template to create the Amazon AWS LAMP stack with RDS (free tier) and succeffully created the stack. But when I tried to move the files to the var/www/html folder it seems to have no permission for the ec2-user. I know changing permission with help of SSH. But my intention is to create a template to setup a stack (hosting environment) without using any ssh client.
Also I know how to add a file or copy a zipped source to var/ww/html with the cloudformation JSON templating. What need to do is, just create the environment and later upload the files using ftp client and db using workbench or something. Please help me attain my goal, which I will share publicly for AWS beginners who are not familiar with setting up things with SSH.
The JSON template is a bit lengthy and so here is the link to the code http://pasted.co/803836f5
use the Cloud formation init Meta instead of Userdata.
That way you can run commands on the server such as pulling down files from S3 and then running gzip to expand them.
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-init.html
tar files and distribution dependent files like .deb or .rpm include the file permissions for directories. So you could set up a tar or custom .rpm file to include ec2-user as the owner
Alternatively, whatever scripting element installs the apache could also run a set of updates to set the owner of the /var/www/html to ec2-user
Of course you might run into trouble with the User / Group that apache runs under and be able to upload with ftp but not able to read with apache. It would need some thought, and possibly adding the ec2-user to the apache group or ftp'ing as the apache user or some other combination that gives the ttpd server read access and the ssh user write access

How to view html file in remote unix server?

I currently have an html file on a remote unix server that I ssh to. I have been using SFTP to constantly transfer it to my local machine to view it after my edits, but I am tired of this.
What is the best program/method for Mac users to have a browser window view of the html file that is stored in a remote unix server? Or is there an ssh client that can easily edit html files?
It is possible, but with some playing around on the server.
Once you have ssh'ed into the server, install a web server in that box.
Say the file is named index.html, you should make it available at the URL http://localhost:8000/index.htmlor port number can be anything.
The simplest method I can think of starting a web server at that location is
cd /directory/where/html/is/present
python -m SimpleHTTPServer 8000 # For python 2
python3 -m http.server 8000 # For python 3
This works provided python is installed on the server. It should not be that hard to install it as python is available from almost every package manager in every flavor of linux.
Now that html is available at python
http://localhost:8000/index.html
on that machine.
But we have not yet configured the browser in such way.
To do that you need to ssh into the server again, but with a -D option this time
ssh servername -D 7000
-D specifies application level tunneling when connecting via ssh
Then in Firefox, preferences/options -> Advanced -> Networks -> Connection Settings -> Choose Manual Proxy configuration
SOCKS HOST should be localhost , port no 7000.
Then the html should be directly available at
http://localhost:8000/index.html
in your Firefox browser.
This feature is only available in the Firefox browser.
You can mount the remote directory with sshfs which gives you easy access to all the files.
E.g.:
sshfs user#server:/directoryToMount /localDirectory