LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-22-2016, 01:52 PM   #1
rooxt
LQ Newbie
 
Registered: Aug 2015
Posts: 5

Rep: Reputation: Disabled
Linux on VirtualBox, Shared Folder troubles.


Hello.

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?

Sorry my English.
 
Old 02-22-2016, 02:20 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
After installing the Guest Additions,


you can use the Shared Folders

Don't Forget to add your user to the virtualbox Groups

Code:
cat /etc/group
to find your actual group name for your virtualbox Group

Last edited by BW-userx; 02-22-2016 at 02:35 PM.
 
Old 02-22-2016, 07:48 PM   #3
dolphin_oracle
MX Linux
 
Registered: Dec 2013
Posts: 402

Rep: Reputation: Disabled
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.

https://www.youtube.com/watch?v=adpalUl4LqI

Last edited by dolphin_oracle; 02-22-2016 at 07:51 PM.
 
Old 02-22-2016, 08:42 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
you Might want to do this too

CLI

Code:
#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"
in,your,host,not,client,Mine,is,
vboxusers:x:993:userx

but,vboxfs,also,in,fact,in,the,client,that,you,also,ha..e
to,add,user,to,vboxfs,group

Last edited by BW-userx; 02-22-2016 at 08:58 PM.
 
Old 03-14-2016, 06:16 PM   #5
rooxt
LQ Newbie
 
Registered: Aug 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-14-2016, 06:22 PM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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.

Last edited by BW-userx; 03-14-2016 at 06:29 PM.
 
Old 03-15-2016, 06:07 AM   #7
rooxt
LQ Newbie
 
Registered: Aug 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
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 ?
 
Old 03-15-2016, 07:03 AM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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]

Last edited by BW-userx; 03-15-2016 at 07:34 AM.
 
Old 03-15-2016, 07:13 AM   #9
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by rooxt View Post
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.

Last edited by BW-userx; 03-15-2016 at 07:35 AM.
 
Old 03-15-2016, 07:39 AM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,665
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
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---.
 
Old 03-15-2016, 09:53 AM   #11
rooxt
LQ Newbie
 
Registered: Aug 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
....... 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/ ?
 
Old 03-15-2016, 10:02 AM   #12
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by rooxt View Post
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.
Code:
 %userx@voided 10:14:37 ~ >>$ mkdir mountme
 %userx@voided 10:16:29 ~ >>$ sudo mount --bind /media/data/Dropbox/ ~/mountme
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?

Last edited by BW-userx; 03-15-2016 at 10:47 AM.
 
Old 03-15-2016, 10:39 AM   #13
rooxt
LQ Newbie
 
Registered: Aug 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
......
any thing else I can try and clear up for you while I'm still awake?
Thank you very much, BW-userx, it works.
Good slumbers to you .
 
Old 03-15-2016, 10:58 AM   #14
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by rooxt View Post
Thank you very much, BW-userx, it works.
Good slumbers to you .
You're welcome and its not even 12 noon yet here, almost Siesta time I suppose.
 
Old 06-07-2016, 12:25 PM   #15
zyama
LQ Newbie
 
Registered: Oct 2014
Posts: 2

Rep: Reputation: Disabled
Dear rooxt.

Please email me, how you did setup "Shared Folder" in Astra.
If not difficult, then, step-by-step.
I have a same trouble.

Можно по-русски.

Last edited by zyama; 06-07-2016 at 12:29 PM.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] VirtualBox shared folder Error. hack3rcon Linux - Virtualization and Cloud 2 07-20-2015 04:38 PM
How to make a shared folder for usage in Virtualbox? vandien76og Linux - Newbie 2 07-17-2011 01:54 AM
[SOLVED] problem using shared folder Virtualbox ken poy Linux - Software 5 12-16-2010 09:30 AM
virtualbox and wine shared folder angelo_maci Linux - Virtualization and Cloud 1 09-23-2010 10:51 AM
virtualbox shared folder phantom_cyph Linux - Software 10 08-09-2007 01:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:10 PM.

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