A Little Help With Permissions

So here’s the deal, I posted the other day about a few issues upgrading from Fedora 26 to 28 and how they related to my KVM (with passthrough) Win X VM.

I got all of that straightened out fine, so I’m at the point I’m wanting to add a 3TB drive to build two VMs on, I got the drive installed, partitioned, and formatted, it shows up in file manager.

When building the new VM and allocating space on the drive it will create a .qcow space (or appears to), it gives me a warning about the VM not having permissions and of course fails to start.

So my question is firstly do I just need to change the permissions of the newly created qcow space or the folder it resides in? I’m at work while typing this but the path to the space is something like the dev/media/blanger/WinXVM or is it better to change the permissions from the WinXVM folder recursively since I plan to build more than one VM in this space?

Sorry if this is a dumb or novice question but I’ve been totally focused on a lot of other things in the last year or so and have forgot a lot about doing this, prior to this upgrade the build just worked and never needed to be messed with…lol

If anyone has the time and if you want to give this old man the brief summery of the commands (chmod), it would be much appreciated, I assume I’ll have to do this from terminal which I’m comfortable doing. My end goal here is that everybody has read, write, and execute privileges.

Yes I know how Google work also…but help a old man out lol

TIA

Are you mounting in /dev? If so, you shouldn’t. /mnt or /media would be better places to put this. (hell, even /var/lib/libvirt/images/3tb, like I’ve got on my system)

Yes. You should absolutely change the permissions of the entire directory. whatever user qemu is running as, that’s what you’ll want to own the folder.

Is there an explicit reason you want everyone to have write? That’s a bad practice, and while it’s not the end of the world on a personal machine, I’m a firm believer in forming good habits.

Re: chmod commands, this article should help you.

https://www.computerhope.com/unix/uchmod.htm

3 Likes

Is it a UID permission issue or a SELinux mislabel?

Well…what I really meant was the VM to have access to read and write , not every user, although I’m the only user…lol I know what you mean though, I just miss spoke…sorry.

I’m not in front of the computer being at work, but I think that path is correct or close, I’ll change it tonight then reset the privileges.

K… that’s what I thought but it’s been awhile..

I thought it was a SELinux issue at first, it really just boils down to the folder having the correct permissions for the VM to install Win X and for Win X to be able to modify those files as any operating system would when you install a program or modify files, I may be wrong but I didn’t encounter this problem when I created my last VM on a partition that the host system also uses another partition on the same physical drive. This time I wanted to use a 3TB drive for VMs only (basically cutting it in half for 2 separate OSs) So installing the drive, partitioning, formatting, and mounting works as expected I can see and access it from file manager, but I don’t (as a user) have permissions to write to the drive. Hope that makes sense.

Thanks for the help both of you guys it’s much appreciated.

1 Like

Could be both?

Yeah, I kinda figured that was your goal, but I wanted to be explicit.

Sounds good.

Always happy to help!

1 Like

Easiest to start with setting SELinux in permissive mode and testing again,if it still doesn’t work it’s a UID issue. Thereonforth it’s easier to troubleshoot

1 Like

Yes, but I dislike advising someone to even temporarily disable/permissive selinux because the temptation is so strong to just leave it off.

1 Like

True dat, but I’m sure @Blanger has more spine than a gummy bear

1 Like

LOL…some days, depends on my wifes mood!

I do think for the sake of gaining the knowledge I’ll switch SELinux to permissive mode first just to see if that is the problem, there is really nothing to loose in checking it out. At this point I can put together a new KVM in less than 10 min with all the hardware configured (I’ve done it so many times), I had a new VM built last week in the old partition I was using before and it worked flawlessly with a fresh install of Win X Enterprise LTSB, and ran all my games/win programs as before but that partition was kinda’ small at around 500gig, this time I just want more space and another separate space to test other VMs without being on the same physical drive as the fedora host, I was just kinda’ shocked when I got permission errors, I had never seen them before in the several years I’ve been running a pass through system on Fedora.

anyway thanks again.

1 Like