0

I just start to use Ubuntu as OS and would like to ask what's the best practice to use apache and save my files on /www saving by programs or FTP.

Thanks a million!

2 Answers2

0

If you have root privileges you can use sftp and ssh for remote access.

sudo apt-get install openssh-server 

You can even mount you remote folder, just add the following line to your fstab:

sshfs#username@ip:/var/www /media/mywww fuse  IdentityFile=/root/.ssh/id_rsa,defaults,nonempty,allow_other,idmap=user,uid=userid,gid=usergrpu  0 0

Locally you can add your user to the www-data group:

sudo adduser <username> www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rw /var/www
Mokus
  • 4,502
0

If it is on the same computer, can't you just use:

sudo cp -r '/PATH/TO/FOLDER' '/www/OTHER-FOLDER'

This will copy the /PATH/TO/FOLDER directory to /www/OTHER-FOLDER - this should also work for files.

To move a folder, use mv instead of cp.

To remove a folder Make sure it is the right folder...:

sudo rm -r '/PATH/TO/FOLDER'
Wilf
  • 30,194
  • 17
  • 108
  • 164