How to copy contents (folders,files) of sub dir back to dir

Hi,

I have a bunch of folders, files within the folder

/var/www/mysite/public_html

which I want to copy back to

/var/www/mysite

Not the folder itself, just the contents of public_html.

I am still unfortunately unable to do this in GUI, what is the command please?

You can do this with:

cp -r /var/www/mysite/public_html/* /var/www/mysite

Although I suspect the issue you are having is with permissions so you might want to add sudo in front of that command. You could also change the permissions on that subdirectory (careful now) and then from the GUI cut all content and paste it where you need it. But at this point you might as well use the command line directly.

Many thanks for the reply. Yes I do sudo for most of my commands although have used sudo -i if I have a few in a row.

How do I change the perms of that sub dir or anywhere in fact, as this is my prob as you rightly say, I should look at doing that.

I see in the Perms tab of that sub dir (public_html) and most of the dirs in that path in the GUI..

Owner is root, (root) Read,Write
Group vboxsf
Access Read, Write
Others None

I see I am in these groups.. (Maybe helpful)
adm cdrom sudo dip plugdev lpadmin vboxusers sambashare vboxsf

I have tried this I see after a search but it doesn't allow a change.

> enter password;
navigate to directory.
Right click on empty space in the main window of nautilus.
Click on properties and go to tab permissions.
Change permissions to what you need.

Not sure if this helps but I see my account type is 'Custom' and in the Mugshot it shows the name I have given myself 'zorin162'.

I ran this 'sudo echo ok' and it says I am admin.

You have to use the user account you set up for the web server when you configured it. You keep running into these issues because you are not using the web admin account you needed to configure when you set up the web server. Try searching the web how to configure that server software (apache, nginx, etc). You could also search how to configure admin account for it as well.

Do some of the work...Introduction to General Help - Please Review before posting

To be clear: I don't think you should change the permissions on this type of directories. Using sudo is just a few more keystrokes away, and the convenience does not outweight the security risk here.

I understand you are doing this locally for practicing, perhaps using a virtual machine or something, and so it's "harmless". But this really isn't the way to go. If you later want to put out a web server online (which is kinda the point of a web server...) and it gets hacked, it will most likely join a botnet which will then be used for who knows what.

I was going to give the instructions on how to change the permissions but decided against this, sorry. For one, because you can find this information very easily anyway, if you haven't already. At it least this way it won't come from me. The fact that you can't drag and drop files in and out of sensitive folders is a good thing and is it's by design.