Sharing files from a "Mounted" HDD
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Sharing files from a "Mounted" HDD
I have installed Mint15 Cinnamon and now would like to learn how to share files/Folders to my Networked computers from a second *DATA* (only) Hard Drive also installed on this same "MINT" (only) computer
I am able and do share files/Folders from the *Mint 15 O.S.* Hard Drive to my other Networked computers with NO problem. I can also "mount" the second Hard Drive while in the Mint O.S. drive, then access, copy, cut, paste files/Folders from each of the two HDDs back and forth with NO problem!
My question is: How can I share files/Folders from my second (non Mint O.S.) Hard Drive to my Networked computers?
I can "SHARE" a Folder like "VIDEOS" from the mounted second HDD, but can`t (apparently) set the PERMISSIONS correctly to actually allow access to the Networked computers.
Is there a reason I am not allowed to share files from a "mounted" hard drive in MINT15 to Networked computers? Am I missing an essential understanding?
I hope I have accurately explained what I`m trying to accomplish here? Any help or guidance would be appreciated
I am able and do share files/Folders from the *Mint 15 O.S.* Hard Drive to my other Networked computers with NO problem. I can also "mount" the second Hard Drive while in the Mint O.S. drive, then access, copy, cut, paste files/Folders from each of the two HDDs back and forth with NO problem!
My question is: How can I share files/Folders from my second (non Mint O.S.) Hard Drive to my Networked computers?
I can "SHARE" a Folder like "VIDEOS" from the mounted second HDD, but can`t (apparently) set the PERMISSIONS correctly to actually allow access to the Networked computers.
Is there a reason I am not allowed to share files from a "mounted" hard drive in MINT15 to Networked computers? Am I missing an essential understanding?
I hope I have accurately explained what I`m trying to accomplish here? Any help or guidance would be appreciated
Re: Sharing files from a "Mounted" HDD
Part of this is related to how the system mounts the drives. When you are in Nemo/Files/Nautilus and you click on a drive to mount it will mount /media/... (usually). Since /media is a dynamic area (its used to mount devices that are external) it makes it more difficult for a beginner to share it out. I would recommend permanently mounting the drive somewhere and then sharing that out. That should always work
For example you could create a directory
And then share this out the way you have shared out other folders. Then editing /etc/fstab and adding the drive in there so that it mounts at boot (if you need help with this just ask!)
Hope this helps
For example you could create a directory
Code: Select all
sudo mkdir /DATA
sudo chown $USER /DATA
sudo chmod 775 /DATA
Hope this helps
Re: Sharing files from a "Mounted" HDD
You referenced 2 different situations so if you would post the output of the following commands it would be helpful:
This may be a very easy fix.
Code: Select all
testparm -s
Code: Select all
net usershare info --long
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Sharing files from a "Mounted" HDD
Hi stratus. Thanks for your kind reply to my forum question(s)
Yes, I would like some guidance on *permanently* mounting my second (non O.S.) Hard Drive I have previously named *939 DATA*.
Editing /etc/fstab is something I have never tried before, so any instruction would be welcomed and appreciated.
Some clarifications if you please:
Is the making a new Directory (you call DATA) *FIRST*, what you mean by: "mounting the drive somewhere and then sharing that out"? "Somewhere" in this case being this newly created Directory called DATA?
Also, is this what you mean by Editing /etc/fstab: "and adding the drive in there"? "In there" being this same newly created Directory called DATA?
Sorry if I sound confused, but I really do want to get this understanding clear!
Thanks again for your help
Yes, I would like some guidance on *permanently* mounting my second (non O.S.) Hard Drive I have previously named *939 DATA*.
Editing /etc/fstab is something I have never tried before, so any instruction would be welcomed and appreciated.
Some clarifications if you please:
Is the making a new Directory (you call DATA) *FIRST*, what you mean by: "mounting the drive somewhere and then sharing that out"? "Somewhere" in this case being this newly created Directory called DATA?
Also, is this what you mean by Editing /etc/fstab: "and adding the drive in there"? "In there" being this same newly created Directory called DATA?
Sorry if I sound confused, but I really do want to get this understanding clear!
Thanks again for your help
Re: Sharing files from a "Mounted" HDD
No problem we all have to learn some time. the file /etc/fstab is a record of every device that should be automatically mounted. Take this for examplemattrixx wrote:Hi stratus. Thanks for your kind reply to my forum question(s)
Yes, I would like some guidance on *permanently* mounting my second (non O.S.) Hard Drive I have previously named *939 DATA*.
Editing /etc/fstab is something I have never tried before, so any instruction would be welcomed and appreciated.
Some clarifications if you please:
Is the making a new Directory (you call DATA) *FIRST*, what you mean by: "mounting the drive somewhere and then sharing that out"? "Somewhere" in this case being this newly created Directory called DATA?
Also, is this what you mean by Editing /etc/fstab: "and adding the drive in there"? "In there" being this same newly created Directory called DATA?
Sorry if I sound confused, but I really do want to get this understanding clear!
Thanks again for your help
Code: Select all
# <file system> <dir> <type> <options> <dump> <pass>
# DEVICE DETAILS: /dev/sda5 UUID=49320281-0c45-46cf-9594-c2001f9d9916 LABEL=SWAP
# DEVICE DETAILS: /dev/sda6 UUID=e13340f4-2281-492d-9783-1ec2eed2bf51 LABEL=
# DEVICE DETAILS: /dev/sda7 UUID=e71eb77e-0fa2-401d-aecb-490f103aa464 LABEL=archRoot
UUID=49320281-0c45-46cf-9594-c2001f9d9916 swap swap defaults 0 0
UUID=e13340f4-2281-492d-9783-1ec2eed2bf51 /home ext4 defaults 0 1
UUID=e71eb77e-0fa2-401d-aecb-490f103aa464 / ext4 defaults 0 1
//someserver/some_remote_folder /mnt/datafeed cifs auto,uid=devdata,gid=devdata,credentials=/etc/sophosshare,domain=mydomain.local,rw 0 0
Below that I am mounting a samba share from the domain, to my local folder. (This is in there just for education, you can ignore it). Lets pretend that I have a second disk. I can find what my disks are called with the following command:
Code: Select all
sudo fdisk -l |grep sd
Code: Select all
[root@someserver tmp]# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Oct 18 16:32 1667aed5-7185-49ff-8084-13fcc50cb193 -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct 18 16:32 2d838da3-f4c3-4113-8126-92293da47fd6 -> ../../sdb1
Code: Select all
sudo mkdir /DATA
sudo chown $USER /DATA
sudo chmod 775 /DATA
Code: Select all
#This gives me a root shell to do the edit
sudo -s
echo "#This is my /dev/sdb1 drive" >> /etc/fstab
echo "UUID=2d838da3-f4c3-4113-8126-92293da47fd6 /DATA ext4 defaults 0 1" >> /etc/fstab
Code: Select all
sudo mount -a
NOTE: I am assuming the disk is formatted EXT4, if not, change the echo command as appropriate
Is this more clear now?
Re: Sharing files from a "Mounted" HDD
Thanks again stratus_ss
Your new reply to me will take me some time to digest! I will print it out and refer to this, but I think I understand the process?
Question:
You replied: "NOTE: I am assuming the disk is formatted EXT4, if not, change the echo command as appropriate."
If in your "NOTE", the disk you are referring to is my Linux drive then YES, the Linux HDD is formatted EXT4. The 2nd. hard drive labeled "939 DATA" by me, is formatted NTFS... if that matters?
Your new reply to me will take me some time to digest! I will print it out and refer to this, but I think I understand the process?
Question:
You replied: "NOTE: I am assuming the disk is formatted EXT4, if not, change the echo command as appropriate."
If in your "NOTE", the disk you are referring to is my Linux drive then YES, the Linux HDD is formatted EXT4. The 2nd. hard drive labeled "939 DATA" by me, is formatted NTFS... if that matters?
Re: Sharing files from a "Mounted" HDD
Hi altair4 and thanks for your reply to my post.altair4 wrote:You referenced 2 different situations so if you would post the output of the following commands it would be helpful:
CODE: SELECT ALL
testparm -s
CODE: SELECT ALL
net usershare info --long
I`m going to try and paste these outputs you requested to this post. NOTE: This "output" is without any sharing attempt by me of my second hard drive. This output indicates my successful sharing of LINUX HDD "VIDEO" Folder to my Networked computers
mistereee@MINT-A8V:~$ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
server string = %h server (Samba, Ubuntu)
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
print ok = Yes
browseable = No
ALSO:
mistereee@MINT-A8V:~$ net usershare info --long
[Videos]
path=/home/mistereee/Videos
comment=
usershare_acl=Everyone:F,
guest_ok=y
mistereee@MINT-A8V:~$
Re: Sharing files from a "Mounted" HDD
please use
Code: Select all
tags for posting output. There is a little code button at the top of the reply window.
As for NTFS for your 939 DATA drive, yes that makes a difference as you will have to change the fstab section "ext4" to "ntfs"
For reference I dont believe testparm will do any good as I believe OP is using nautilus-share (i.e. right clicking and sharing folders this way). That being the case the smb.conf file will not change and therefore testparm is not useful
To the OP, all that jibberish is explained like this. In the old way of sharing out folders you manually edited /etc/samba/smb.conf and then restarted samba. "testparm" is a program which checks smb.conf for errors and then reports back. Since I doubt you are using the old style of sharing, using testparm will not produce anything. The second option mentioned is what provides information on your current shares.
altair4 was most likely just covering all the bases at once
Re: Sharing files from a "Mounted" HDD
Remember to share and access a partition either locally or as a samba client the partition must be mounted. When you open up Nemo and access the NTFS partition you mount it. At that point you can share it through Nemo but there is a problem with this mechanism. It mounts to:
/media/mistereee/something.
The permissions on /media/mistereee are set by the system using an Access Control List that prevents anyone from accessing "something" who isn't mistereee.
So my recommendation if you want to have this work as is:
[1] Edit /etc/samba/smb.conf
[3] Then restart samba:
[4] Now go into Nemo and access the ntfs partition so that it is mounted and share the partition or folder you want shared.
The remote guest user should now have access to the folder.
You can skip the step of mounting the partition if you follow stratus_ss's recommendation to have it automount but to have it comply with a dual boot situation and still accommodate the nemo-share process of samba share creation I would recommend adding "uid=1000" and "windows_names" to the list of options in the fstab line.
Side note: It really doesn't matter since it will correct itself anyway but setting permissions on a mount point before the partition is mounted will do nothing since it will be overridden by the permissions of the mount itself.
/media/mistereee/something.
The permissions on /media/mistereee are set by the system using an Access Control List that prevents anyone from accessing "something" who isn't mistereee.
So my recommendation if you want to have this work as is:
[1] Edit /etc/samba/smb.conf
[2] Add a line under the workgroup line towards the top of the file:gksu gedit /etc/samba/smb.conf
Code: Select all
force user = mistereee
Code: Select all
sudo service smbd restart
The remote guest user should now have access to the folder.
You can skip the step of mounting the partition if you follow stratus_ss's recommendation to have it automount but to have it comply with a dual boot situation and still accommodate the nemo-share process of samba share creation I would recommend adding "uid=1000" and "windows_names" to the list of options in the fstab line.
Side note: It really doesn't matter since it will correct itself anyway but setting permissions on a mount point before the partition is mounted will do nothing since it will be overridden by the permissions of the mount itself.
Last edited by altair4 on Tue Nov 26, 2013 4:07 pm, edited 1 time in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Sharing files from a "Mounted" HDD
Your assessment of testparm is partially correct but keep in mind that smb.conf still has control of usershares - but at a global level not at a share level.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Sharing files from a "Mounted" HDD
So to automount the ntfs partition the line in fstab would look something like this:
*** To find the correct UUID number run this command:
*** Create the mount point:
Don't bother chmod'ong or chown'ing it it won't matter after the mount.
Then run:
Code: Select all
UUID=DA9056C19056A3B3 /DATA ntfs defaults,nls=utf8,umask=000,uid=1000,windows_names 0 0
Code: Select all
sudo blkid -c /dev/null
Code: Select all
sudo mkdir /DATA
Then run:
Code: Select all
sudo mount -a
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.