tar. cannot change ownership to uid 0,gid 0; permission denied when creating a OpenVZ

atinazzi

Active Member
Mar 15, 2010
57
1
26
I am having problems creating an OpenVZ container.
tar cannot change ownership to uid 0,gid 0 because of permission denied.

The installation directory is a cifs mounted locally via fstab.
If I log in to the server as root via ssh I am able to create files and folders, move them, rename them and delete them from the mounted cifs but I am unable to chown any file or folder in the cifs as I get a 'permission denied' message.

Please note that the original folder sits on a NAS and has been setup for public access. Permissions are 777 and I tied to mount the share in many different ways, setting uid and gid, umask, as a guest and using user credentials. I have no problem reading or writing the share, I just have problems changing ownership to files and directories.

I am sure it is something simple that I am missing... could someone please enlighten me on what could it be that I am missing?
 
Re: tar. cannot change ownership to uid 0,gid 0; permission denied when creating a Op

you run the latest version? post the output of 'pveversion -v'
 
Re: tar. cannot change ownership to uid 0,gid 0; permission denied when creating a Op

Hi Tom, yes I believe is the latest version:

pve-manager: 2.0-18 (pve-manager/2.0/16283a5a)
running kernel: 2.6.32-6-pve
proxmox-ve-2.6.32: 2.0-55
pve-kernel-2.6.32-6-pve: 2.6.32-55
lvm2: 2.02.88-2pve1
clvm: 2.02.88-2pve1
corosync-pve: 1.4.1-1
openais-pve: 1.1.4-1
libqb: 0.6.0-1
redhat-cluster-pve: 3.1.8-3
pve-cluster: 1.0-17
qemu-server: 2.0-13
pve-firmware: 1.0-14
libpve-common-perl: 1.0-11
libpve-access-control: 1.0-5
libpve-storage-perl: 2.0-9
vncterm: 1.0-2
vzctl: 3.0.29-3pve8
vzprocps: 2.0.11-2
vzquota: 3.0.12-3
pve-qemu-kvm: 1.0-1
ksm-control-daemon: 1.1-1
 
Re: tar. cannot change ownership to uid 0,gid 0; permission denied when creating a Op

I never tried it this way but I will try to setup a similar setup this week in our lab.
 
Re: tar. cannot change ownership to uid 0,gid 0; permission denied when creating a Op

Hi

I think I did some progress which leaded me to a number of different issues.

I contacted the vendor of my NAS unit and they suggested that the problem with being unable to change ownership may be caused by the fact that I formatted the NAS in ZFS. I am not an expert on file systems but ZFS to my knowledge is one of the most advanced file systems and has plenty of innovative features. Anyway, i followed their advice and re-formatted the NAS using EXT4. Now in fact the problem of changing ownership seems to have gone, but I am still unable to create an OpenVZ container. This time however I am having a different issue:

Creating container private area (debian-6.0-standard_6.0-4_i386.tar.gz)
Warning: Temp dir /mnt/VM_Containers/private/101.tmp already exists, deleting
tar: ./usr/local/man: Cannot create symlink to `share/man': Operation not supported
tar: ./usr/share/perl/5.10: Cannot create symlink to `5.10.1': Operation not supported
tar: ./usr/share/groff/current: Cannot create symlink to `1.20.1': Operation not supported
tar: ./usr/share/terminfo/g/guru-lp: Cannot create symlink to `guru-76-lp': Operation not supported

................

tar: ./usr/share/groff/site-tmac: Cannot create symlink to `/etc/groff': Operation not supported
tar: ./usr/share/aptitude/COPYING: Cannot create symlink to `../common-licenses/GPL': Operation not supported
tar: Exiting with failure status due to previous errors
vps-create ERROR: Error in tar --numeric-owner -Sp -z -xf /mnt/VM_Templates/template/cache/debian-6.0-standard_6.0-4_i386.tar.gz
Creation of container private area failed
TASK ERROR: command 'vzctl --skiplock create 101 --ostemplate /mnt/VM_Templates/template/cache/debian-6.0-standard_6.0-4_i386.tar.gz --private

Anothe issue I have noticed is that when I delete a container from the web interface, the actual file system of the container is not removed from storage. I have to ssh in, go to the containers subfolder and rm -r <CID>.

It may be an issue caused by the cifs, so maybe I will try using NFS instead

.... update....

I created a container using a template of ubuntu 10.04 standard i386 on a NFS share. The task was successful this time but it needed about 1 hour to complete. On Proxmox 1.9 it happens in seconds (on local storage). The NAS is connected with an aggregated gigabit link and jumboframes and normally it performs quite OK.
I have started the contained and is behaving very strangely. It starts up but in an unusual long time. I am unable to access it either via console or ssh but status shows that it is actually working. Is OpenVZ implementation of Proxmox 2 still quite buggy or should I be checking my server and NAS?
 
Last edited:
Re: tar. cannot change ownership to uid 0,gid 0; permission denied when creating a Op

if you use NFS, you should mount it as NFSv3 (search forum for howto).
 
Re: tar. cannot change ownership to uid 0,gid 0; permission denied when creating a Op

The strange behavior and unresponsiveness of the container was probably due to the fact that the cluster was backing up.
I created a second identical container when the backup finished and it took the same time to create (about 1 hour).
Anyway... beside the long deployment time, both containers works fine.
I will follow your advice about NFSv3.
Thanks Tom
 
Re: tar. cannot change ownership to uid 0,gid 0; permission denied when creating a Op

I checked into /etc/pve/storage.cfg and it looks like proxmox mount NFS using version 3 by default now.
I tried creating the exact same container on the local storage and it takes about 12 seconds.
Do you believe the issue is caused by Proxmox NFS implementation or by my NAS?
 
Re: tar. cannot change ownership to uid 0,gid 0; permission denied when creating a Op

local storage is much faster on container creation, we see this also here.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!