ubuntuVM-0-6-ubuntusrvwwwadminshangxiacomshared$ tar -cvf archivetar srvwwwadminshangxiacomsharedmediatar archivetar Cannot open Permission deniedtar Error is not recoverable exiting now
The error message suggests that you do not have permission to create the archive file in the current directory. To resolve this issue, you can either run the command with superuser privileges (using sudo), or specify a different directory where you have write permissions to create the archive.
Here's an example of using sudo to create the archive file in the same directory:
sudo tar -cvf archive.tar /srv/www/admin.shangxia.com/shared/media
Alternatively, you can specify a different directory where you have write permissions to create the archive file:
tar -cvf /path/to/different/directory/archive.tar /srv/www/admin.shangxia.com/shared/media
Make sure to replace /path/to/different/directory with the actual path to the directory where you want to create the archive.
原文地址: https://www.cveoy.top/t/topic/i9aI 著作权归作者所有。请勿转载和采集!