Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have Astra Linux installed on Oracle Virtual Box.
Astra is a distributive based on Debian.
I created Shared Folder, the corresponded record is placed in /etc/fstab.
After the guest Linux System started, the SharedFolder is not accessible with rights of user which logged on, it is accessible for root only.
After I do command su, SharedFolder is accessible (for root user). After that I do umount /media/SharedFolderMountPoint and mount -a.
And SharedFolder is accessible for simple users, not for root only.
I don't understand possible reasons. What can I do for SharedFolder was accessible for simple users immediately after system loading?
I want to say its the vboxfs group on the guest OS that you need to enable. On debian, this group gets created with the installation of the guest additions but the user is not generally added to it.
you might find this video useful on setting up guest additions and shared folders in virtual box. I used MX-14 for the video, which is also debian based.
#sets your clients to be able to be set at any Resolution using the client Menu
#under View, works after the client has fully started
VBoxManage setextradata global GUI/MaxGuestResolution any
#sets your clients to be able to be set at user specifed Resolution
VBoxManage setextradata "VBoxClientNaMe" "GraphicsMode" "1366x768x32"
Dear BW-userx and dolphin_oracle, thank you very much, problem is solved, shared folders work.
Excuse me for a long pause.
I have some questions:
1. I can ignore command mount on my guest-linux system, folder will be mounted on /media/sf_FolderName, I tried in two guest-system - astra and mint.
2. If command mount works with parameter DeviceName, there are must exist some file /dev/SomeFileOfVirtualBox, and more precisely /dev/FolderName - but I don't found nothing like.
you set up your shared folder in setting for that virtual box when you are setting it up their are check boxes for auto mount, read-only -- this is how you set up your shared folders between your host and client.
if you are talking about they are already mounted but where are they, then easy fine. open up a file manager then look in the address bar.
I know where shared folder is mounted - in /media/sf_Shared. When I set up shared folder settings I wrote shared folder name - 'Shared' but I didn't wrote path '/media/'. Why shared folder is mounted in /media/sf_Shared ?
They have a very convenient little GUI tool. Open up your Main window that stores all of your installs for VBox OS's. then select the one you want to add or change settings to. Then click "settings" Another window opens, in that NEW window select "Shared Folders". If you have one already set to a folder, and it is not working, PROVIDING you have installed "Guest additions" added the user to the group within the client, vboxsf, if the group is not present, then ADD IT.
Code:
#groupadd GroupName
Then add you user to this new group, log out then log in, to activate it.
Now going back to the setting part of this situation. While in settings, under "Shared Folders" if they are not working then delete them, and start over. Clicking on the folder icon with the + on it. then selecting the "drop down list" select "other". then manually navigate to your folder(s) you want to add. Click on it/them, thus adding the folder(s) to the system settings.
before you close it off in the same window for the folder you have two check boxes to contend to, deal with them accordingly.Because they are self explanatory I will not go into it in this posting. When you have completed this task save your settings.
Now, when you are booting your client watch the messages you should see a line stating that it has auto mounted your shared folder(s).
[misunderstood question, but I'm leaving it because it is good step by step to setting up shared folders]
I know where shared folder is mounted - in /media/sf_Shared. When I set up shared folder settings I wrote shared folder name - 'Shared' but I didn't wrote path '/media/'. Why shared folder is mounted in /media/sf_Shared ?
DO you have a folder on your OS under your user name that actually says "Shared"?
if yes, then why do you think it mounted it if you actually have a folder named that within your user account that is using VBox?
as far as it being mounted in the /media folder that is the default folder where other folders are mounted to. In techy talk, that is the mount point that the system uses by default.
Having bashed my cranium thoroughly against this very issue, not long ago, here is the one thing that I have found works reliably:
(1) In the "shared drives" page of the Virtual Machine definition, specify that the drives are to be "auto-mounted," read-only or read-write as the case may be. Due to various timing problems at VM startup, I found that no other method worked reliably.
(2) Add any user that you want to have access to the drive, to the vboxsf group.
(2a) Don't forget to add the user that the Apache web-worker processes run under! The Apache control process might run as root, and therefore have access, while the slaves that actually serve pages do not.
(3) So far as I know, everything on the shared drive will be writeable regardless of permission masks. The mask is forced to rwxrwx---.
....... In techy talk, that is the mount point that the system uses by default.
Thank you, BW-userx, I didn't know it, now it's clear for me.
And my second question? :
Quote:
Originally Posted by rooxt
......
2. If command mount works with parameter DeviceName, there are must exist some file /dev/SomeFileOfVirtualBox, and more precisely /dev/FolderName - but I don't found nothing like.
Or I'm not right and the parameter DeviceName of the command mount is not necessarily a some file in folder /dev/ ?
Thank you, BW-userx, I didn't know it, now it's clear for me.
And my second question? :
Or I'm not right and the parameter DeviceName of the command mount is not necessarily a some file in folder /dev/ ?
No you do not need to use that method to mount, this is what the share folder settings are used for, unless you're in your client VBox session and mounting through the usb port if needed due to auto mount not working. Or, if you're in your client and mounting within itself contained system other devices to your system.
but over all NO you do not have to worry about going command line commandO' on any mounting routines to access directories outside of your client, go through your Client settings to preform these duties.
to mount or not to mount:
mounting folders to another folder
source has stuff in it (Data)
destination is empty folder, or not, depending if users wants it mixed into other data or not.
now instead of me having to go through /media/data/Dropbox to get to data inside of Dropbox, all I have to do is go into ~/mountme and everything that is in Dropbox is now in ~/mountme as well. I too could have used a soft link to do the same instead.
Code:
#ln -s source destination
who can actually do this? Root can do all things, that is why it is called "god mode".
user can link anything to anything, Mounting is a god only thing.
Code:
%userx@voided 10:38:10 ~ >>$ ln -s /var mountme
%userx@voided 10:38:19 ~ >>$ ls mountme
var
%userx@voided 10:40:32 ~ >>$ rm mountme/var
%userx@voided 10:40:41 ~ >>$ mount --bind /var mountme
mount: only root can use "--bind" option
to discover if it is a /dev/ just blkid or sudo blkid first. if it is not in the list then it is not a /dev mounting operation.
any thing else I can try and clear up for you while I'm still awake?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.