I currently have ubuntu 14.04 with lamp stack running in virtualbox under win 8.1. I use PhpStorm inside the virtualbox. Virtualbox is running fine except for some flickering and screen refresh issues sometimes.
I think maybe to run PhpStorm under Windows and share my home/project folder with samba. I would do svn/git commits from windows as well
Is it safe from any side effects like wrong file encoding or file rights?
There shouldn't be any issues with using a
VirtualBox
for a LAMP stack.Since you haven't mentioned any other uses for Ubuntu you have in your
VirtualBox
, might I suggest using a server edition of Ubuntu instead - that way you can save on some resources.If you need a graphical environment to change configuration files, you can use something like webmin. Which you can install using the below command:
You can also use
svn
orgit
to push things to LAMP instead of usingsamba
, or you could usesftp
- which would be better. You simply have to install an ssh server, this answer shows you how (note, you might have to changegedit
tonano
in several commands if you are using Ubuntu server, if you are using the desktop edition you can follow the guide as-is):How to set up Ubuntu SFTP server? by firefly2442
The best resource to help you begin setting up an ssh service on a host machine using Ubuntu is OpenSSH Server. This will allow you to use SSH File Transfer Protocol (also Secure File Transfer Protocol, or SFTP) to access, transfer, and manage files over SSH.
Overview of Solution
OpenSSH server
on a host machine and a user can then usessh
to connect from their client machine to the host machine's server using only a username and password. Note, however, that public key authentication is recommended,Setup your OpenSSH Server
To install an OpenSSH server on your host machine:
Enable
PasswordAuthentication
in yoursshd_config
fileTo configure your OpenSSH server, "first, make a backup of your sshd_config file by copying it to your home directory, or by making a read-only copy in /etc/ssh by doing:"
"Once you've backed up your
sshd_config
file, you can make changes with any text editor, for example:"Find the line with the phrase
PasswordAuthentication
and make it read:Save your new
sshd_config
file and then restart the host machine'sssh
service:Setup Port Forwarding on your local router to direct traffic to your OpenSSH server
Note the port your host machine's
ssh
service listens to in thesshd_config
file and setup your router to forward TCP/UDP traffic aimed at this port to the IP address of your OpenSSH server.192.168.1.1
in order to login to your router and setup port forwarding.Connect to your host machine and login to your Administrative User Account with
sudo
privilegesTo open an SFTP shell terminal as
<username>
on the host machine, open a Terminal on your client machine and enter the following command, replacing123.123.1.23
with your host machine's IP address:If you changed the port number your host machine's OpenSSH server listens to, do:
To open an SSH shell terminal as
<username>
on the host machine, open a Terminal on your client machine and enter the following command, replacing123.123.1.23
with your host machine's IP address:If you changed the port number your host machine's OpenSSH server listens to, do:
Alternatively, if you simply want to use sftp to visually access the host machine's filesystem (e.g., using Nautilus)
SSH
sshd_config
fileCreate Standard User Accounts on host machine with limited file permissions outside their home folder
If I understand you correctly, proper file permissions in place on the host machine guarantee that each standard user (without sudo privileges) that you create on the host machine will own their
/home/new_user
directory but have limited permissions with the rest of the directory structure.Hope that's helpful!