[SOLVED] ERROR GRANTING PERMISSIONS TO A MOUNT POINT WITHIN A CT

avaaru

Member
Aug 15, 2018
11
0
21
26
Hello.
I have several disks mounted on proxmox system. I share these disks with the CTs through Mount Point. All disks mounted via MP to my CTs work fine except for one. I have a disk mounted on the proxmox system called "DISCO-5-111GB" that works correctly, but when making a MP to my CT it doesn't let me change the permissions, nor the owner of said MP.

The configuration is the same as the other disks that do work.

I leave configuration files.

Config /etc/fstab:
1660926638914.png

Permissions of mounted disks:
1660926604833.png

Config to CT:
1660926834365.png

Error when giving permissions in the CT:
1660927011050.png



The permissions error is only generated within my CT and with that disk. In the proxmox system it works correctly.

Thank you very much, I wait for an answer.
 
Hey :)

Not a real answer, but i think that without a privilegied container, you cannot modify rights on MP in the CT...
When privilegied, you can add more option in options tab, in "features" ;)

Hoping that it's helped you :)
 
Hey :)

Not a real answer, but i think that without a privilegied container, you cannot modify rights on MP in the CT...
When privilegied, you can add more option in options tab, in "features" ;)

Hoping that it's helped you :)
Hello. Thank you very much for your reply. I have permissions on the ct, I can modify the characteristics of the options tab. Within that CT I have four MPs whose permissions I can change, but the fifth MP won't let me.
Would any other information be helpful?
 
Yes, filesystems. Please post the output of df -PHT of the disks in question.

Perform df -PHT on the CT and this was the result. Of the disks: sdb1, sdc1, sdd1 lets me change permissions and owner. From the sde1 disk it does not let me modify permissions or the user

Screenshot_2.png
 
:)

can you give us too your dmesg just after retryed your permission give :)

Dentro del CD, el comando dmesg me dice lo siguiente: dmesg: falló la lectura del búfer del kernel: Operación no permitida

If I do the dmesg outside of proxmox the result doesn't change after giving permissions again.

The result inside nextmox is:

Screenshot_4.png

Should the dmesg command work inside a CT?
 
Should the dmesg command work inside a CT?
Depending on the security settings, but you will not - if any - have other output. The command will just print the kernel ring buffer and you have only one kernel, that is shared with all containers.
Of the disks: sdb1, sdc1, sdd1 lets me change permissions and owner. From the sde1 disk it does not let me modify permissions or the user
Okay, now please post ls -ld <mountpoint> fot all mountpoints so that we see the actual permissions of the topmost directory in each mountpoint
 
Bien, ahora publique ls -ld <mountpoint> para todos los puntos de montaje para que podamos ver los permisos reales del directorio superior en cada punto de montaje

I publish the ls -ld command of each MP

Screenshot_5.png

I also post an attempt to change the permission of the MP that fails and as a change of permission in another MP if it works.
The failing MP named DISCO-5-111GB

Screenshot_6.png


Thank you very much for this help, I am very blocked with this error
 
So I suspect, you cannot change the permissions on DISCO-2 and DISCO-3 from the LX(C) container either?
I can change the permissions of DISCO-2 , DISCO-3 and DISCO-4. But I cannot change the permissions in DISCO-5
 
Can you try to change the permissions from the PVE host? Maybe the disk is mounted read-only. Please also post mount | grep sde
 
Can you try to change the permissions from the PVE host? Maybe the disk is mounted read-only. Please also post mount | grep sde

It has read and write permissions. It's all well set up, right?


In the PVE if I can modify permissions. But I can't on the CT

Screenshot_11.png

Command mount | grep sde


Screenshot_12.png

File fstab

Screenshot_13.png
 
I can change the permissions of DISCO-2 , DISCO-3 and DISCO-4. But I cannot change the permissions in DISCO-5
Please post the output of changing DISCO-2 and DISCO-3 from the container, so please run:

Code:
ls -ld /home/DISCO-2 /home/DISCO-3
chmod 755 /home/DISCO-2 /home/DISCO-3
ls -ld /home/DISCO-2 /home/DISCO-3

This problem does not make sense if -2 and -3 indeed work. They should not due to the container user id shift.
 
The result is as follows:
red square not function
green square function

Screenshot_14.png


I have tried in another ct and the result is the same

Attached photo of the CT configuration file

Screenshot_15.png

Because one functionand the other three not function. Do they have the same configuration?
 
So, now we have all the information that is required. To get it to work, please change the owner and group of the mountpoints from within the PVE host RIDDLER:

Code:
chown 100000:100000 /home/DISCO-2-6TB /home/DISCO-3-6TB /home/DISCO-5-111GB

The problem is that you use unprivideged containers and the root inside of that container has UID 100000, so if the real uid is lower, you will have any permission to change anything even as root.
 
  • Like
Reactions: avaaru
So, now we have all the information that is required. To get it to work, please change the owner and group of the mountpoints from within the PVE host RIDDLER:

Code:
chown 100000:100000 /home/DISCO-2-6TB /home/DISCO-3-6TB /home/DISCO-5-111GB

The problem is that you use unprivideged containers and the root inside of that container has UID 100000, so if the real uid is lower, you will have any permission to change anything even as root.

Thank you very much. The solution has worked perfectly. Thank you very much. I don't know how I could thank you. Now to finish putting my server up and running.
 

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!