Simple File Sharing in Mint

Quick to answer questions about finding your way around Linux Mint as a new user.
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.
Locked
Oc3lot

Simple File Sharing in Mint

Post by Oc3lot »

Nice tutorial.
I have a question.
When i choose the Remote User method, does the RemoteUser need to be the owner of the shared folder, right?

EDIT BY MODERATOR

split from older post:
http://forums.linuxmint.com/viewtopic.p ... 9&start=60

as this is a new thread
- Please Don't re-cycle old threads.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Simple File Sharing in Mint

Post by altair4 »

Not necessarily.

The samba usershare process will allow any authenticated user access the share. Now once inside the share ( and once inside that shared folder ) that user may or may not have write ( as in edit ) access to individual files within the share since that's dependent on the Linux permissions of that file.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
pumpkinpie

Simple File Sharing in Mint

Post by pumpkinpie »

I am a complete noob to linux so forgive me if this seems silly.

I have a 4 bay disk enclosure hooked up to intel nuc running linux mint and want to share the disks over my network to various machines including windows desktops, openelec chromebox, fire tv sticks, etc.

On my windows desktop i was able to see the drives but not access any of the files on them. On my chromebox i wasnt even able to see the drives.

Any help would be greatly appreciated.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Simple File Sharing in Mint

Post by altair4 »

I have no idea what an "intel nuc" is. Maybe this other HowTo will help you or maybe it won't: Samba Browsing Problems Checklist
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
pumpkinpie

Re: Simple File Sharing in Mint

Post by pumpkinpie »

intel nuc (next unit of computing) is one of these - http://www.intel.com/content/www/us/en/ ... 17gke.html

when I try and access a usb stick from my windows computer it says I do not have permissions to access. And I am not able to change the permissions at all. everytime i try and change them it reverts back too the default setting.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Simple File Sharing in Mint

Post by altair4 »

Still don't know what it is but if you have Mint installed on it and you can access it somehow run the following commands from it and post the output:

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.
pumpkinpie

Re: Simple File Sharing in Mint

Post by pumpkinpie »

its just basically a mini intel motherboard with an i3 processor - anyway here are the results

1st -
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, Linux Mint)
server role = standalone server
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

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers


2nd -
info_fn: file /var/lib/samba/usershares/new volume 1 is not a well formed usershare file.
info_fn: Error was Path is not a directory.
info_fn: file /var/lib/samba/usershares/movies is not a well formed usershare file.
info_fn: Error was Path is not a directory.
info_fn: file /var/lib/samba/usershares/new volume 2 is not a well formed usershare file.
info_fn: Error was Path is not a directory.
[PNY]
path=/media/dan/PNY
comment=
usershare_acl=Everyone:R,Unix User\dan:F,
guest_ok=y

new volume 1 and new volume 2 are the disks in the 4 bay enclosure i was originally trying to share but are not attached at the moment. pny is the usb stick i have plugged in
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Simple File Sharing in Mint

Post by altair4 »

Edit smb.conf as root:

Code: Select all

gksu gedit /etc/samba/smb.conf
Add the following line - right under the workgroup line towards the top of the file:

Code: Select all

force user = dan 
Save the file then restart samba:

Code: Select all

sudo service smbd restart
Wait a few minutes then access the share again.

The way Linux is set up today the only user that can get to /media/dan/PNY is "dan". "force user = dan" will make the guest samba user appear to be dan - for those shares anyway.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
pumpkinpie

Re: Simple File Sharing in Mint

Post by pumpkinpie »

thank you !!! working now for me - appreciate the help !!
Locked

Return to “Beginner Questions”