1

I am making a website that I run with apache from var/www, I have stopped the apache server and closed gvim, but when I right click on compress, select .7z compression with password. I get an error:

    An error occurred while adding files to archive. 

I can copy the files, so why can't I compress them like this? I can also compress the files when I move the files to my home folder...

1 Answer 1

1

If you are trying to use the "Compress" option in nautilus, first run sudo nautilus in a terminal in order to use that script with root permissions, then navigate to the /var/www folder and try again.

If you are dropping a terminal command in order to achieve the compress task, make sure you use sudo before the command.

To pack (make a file):

sudo tar cvf filename.tar /var/www/* 

To pack and compress:

tar czvf filename.tar.gz /var/www/*

These examples will pack (and compress) the /var/www folder contents in a file named "filename.tar" (or "filename.tar.gz"). You should read your compression program help in order to gather information about how to do this from the terminal.

Good luck!

2
  • 1
    It would be better to use gksudo nautilus. Or in Terminal 7z a -p /tmp/test.7z /var/www.
    – arrange
    Mar 7, 2011 at 18:21
  • 1
    I yet wonder why people is always having better ideas than mine and they simply don't dare to post their own answer... Is it funny to put reviews? I will probably join... Thank you anyway, I am sure that ganjan will also thank you. Mar 7, 2011 at 18:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .