0

I am using a virtual machine with Ubuntu 18.04 desktop, and I am working on a Wordpress project with Nginx. I installed VBox guest additions, but I cannot change the owner of the shared folder, which I have set to auto mount in the /opt folder; the path to the shared folder is /opt/myfolder/THISFOLDER. I want to edit contents (files) inside THISFOLDER. I have tried the command sudo chmod -aG vboxsf myusername and rebooted to no avail. When I do sudo chown -R myusername /opt/myfolder, it also doesn't do anything. How can I fix this?

1 Answer 1

0

Try this: cd /opt/myfolder ; pwd - verify that pwd prints /opt/myfolder and nothing else, then sudo chown -R myusername:mygroup *

  1. to run sudo in "local" folder is a bit safer w.r.t. errors.
    (hint: try echo * and press enter)
  2. Also set group, this might be your actual problem - i.e. keeping the current group attempting to set yourself as the owner. If you're not member of that group it will likely fail (not verified).
2
  • it didn't work.
    – AviG
    Commented Sep 16, 2019 at 20:03
  • Have a look at what numbers you have in cat /etc/group (groups) and cat /etc/passwd (user IDs) - then compare to what you see with ls -ln in the folder and possibly in some subfolders. Also check inside the virtual machine in the same way... a virtualbox/vmware document check might reveal something.
    – Hannu
    Commented Sep 16, 2019 at 21:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .