LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 05-02-2022, 12:39 PM   #1
doskanoness
LQ Newbie
 
Registered: Oct 2021
Distribution: Arch Linux, Debian, OpenBSD
Posts: 14

Rep: Reputation: Disabled
KVM guest cannot write to 9p shared folder by non-root user


Hi there

I need to set up write access for user portage on the guest for the directory /var/cache/binpkgs. As a root user, I can write any content to the /var/cache/binpkgs but when I drop privileges to a non-root user I'm getting a permission denied error. I don't want to run qemu processes as a root user on the host and I'm not going to chown 777 /var/cache/binpkgs directory on the host.

Any ideas on how to allow non-root users, in my case portage to write content on the guest virtual machine to the shared directory via 9p /var/cache/binpkgs?

Thanks
 
Old 05-03-2022, 10:05 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,142

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
Check logs on host and guest for selinux errors.
 
Old 05-03-2022, 10:14 AM   #3
doskanoness
LQ Newbie
 
Registered: Oct 2021
Distribution: Arch Linux, Debian, OpenBSD
Posts: 14

Original Poster
Rep: Reputation: Disabled
I don't use SELinux.
 
Old 05-03-2022, 11:43 AM   #4
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,173

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Google turned up a few results that should work for you:
https://www.digitalocean.com/communi...-owned-by-root
https://stackoverflow.com/questions/...user-to-sudoer
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Setup A Shared Folder Between KVM Host And Guest In Linux LXer Syndicated Linux News 0 05-07-2021 03:57 AM
[SOLVED] Can't mount shared folder - Virtualbox - Ubuntu 18 Guest OS - With Guest Addition swilsy Linux - Virtualization and Cloud 6 12-24-2018 06:54 PM
Kernel-based Virtual Machine (KVM): Switching from KVM guest to host (e.g. Linux Mint) & maximize guest screen fanoflq Linux - Newbie 2 07-13-2016 06:10 PM
how can i write to a root:root 750 file with a non-root user? Droa Linux - Newbie 1 05-14-2012 07:49 PM
I can not open the user folder in home and write in a shared folder jorge_ivan Linux - General 8 08-02-2006 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 09:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration