LinuxQuestions.org
Visit Jeremy's Blog.
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 12-28-2009, 09:33 AM   #1
tebucky
Member
 
Registered: Mar 2004
Posts: 89

Rep: Reputation: 15
Basic Samba Setup


All,

I have installed Samba on my Ubuntu 9.04 box. I can see the share on my XP machine but when I try and create a directory I get permissions errors.

Can anyone assist?
 
Old 12-28-2009, 09:48 AM   #2
tebucky
Member
 
Registered: Mar 2004
Posts: 89

Original Poster
Rep: Reputation: 15
I should also state that I can't write to the volume from the XP box. I can copy files and move them to the XP machine but I can't create anything from that host.
 
Old 12-28-2009, 04:20 PM   #3
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,590

Rep: Reputation: 111Reputation: 111
Check the permissions on the share (while logged onto the Windows box). Share permissions should be Full Control for Everyone. Then check the NTFS permissions on the folder or folders in the share. They should be set to allow the connecting account to do the things you wish it to do Full Control, Read, Write etc. See if that helps.

Ken
 
Old 12-28-2009, 09:11 PM   #4
archaicDEBIANt
LQ Newbie
 
Registered: Aug 2009
Distribution: Debian and Arch
Posts: 17

Rep: Reputation: 0
Check also your smb.conf. If you want your M$ box to read/write to your Ubuntu box, add a read list in your share...or just put "no" in the read only line, like this one....

[SHARED_FOLDER]
path = /path/that/is/shared
valid users = user1, user2
read list = user2
write list = user1
read only = no
browseable = yes
create mask = 0775
force create mode = 0775
directory mask = 0775
force directory mode = 0775

Hope that helps.

On the the other hand....I have a little prob with regards to file prohibitions. I want to prohibit uploading music and video files to my shared Linux box. There are users in my network that makes this box a repo for their music and vids and that is occupying so much space. I resort to locating these files every now and then and deleting them. I'm not sure if this is do-able in smb.conf (I guess not). I guess I would be needing a script or some sort that somehow tells smb.conf to prohibit these files. Any help or hint is greatly appreciated. Thanks!
 
Old 12-29-2009, 07:17 AM   #5
tebucky
Member
 
Registered: Mar 2004
Posts: 89

Original Poster
Rep: Reputation: 15
So here is my original smb.conf

[volcano]
path = /volcano
available = yes
valid users = user1
read only = no
browsable = yes
public = yes
writable = yes

Do I need to insert the additional lines that were suggested?

I changed it to:

[volcano]
path = /volcano
available = yes
valid users = user1
read only = no
browsable = yes
public = yes
writable = yes
create mask = 0775
force create mode = 0775
directory mask = 0775
force directory mode = 0775

and still no luck writing to the box from XP. Am I missing something obvious?
 
Old 12-31-2009, 02:31 AM   #6
archaicDEBIANt
LQ Newbie
 
Registered: Aug 2009
Distribution: Debian and Arch
Posts: 17

Rep: Reputation: 0
I assume you restarted the samba service after editing the smb.conf. If that doesn't work, try inserting those lines, read list and write list (with the appropriate users you added in /bin/false)...then restart the samba service again.
 
Old 12-31-2009, 08:13 AM   #7
tebucky
Member
 
Registered: Mar 2004
Posts: 89

Original Poster
Rep: Reputation: 15
So, what exactly does /bin/false do?

I made the entry so my conf looks like:

[volcano]
path = /volcano
available = yes
valid users = user1
read list = user1
write list = user1
read only = no
browsable = yes
public = yes
writable = yes
create mask = 0775
force create mode = 0775
directory mask = 0775
force directory mode = 0775

and restarted the service to no avail... I ran testparm and here is the output

root@chach:/etc/samba# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[printers]"
Processing section "[print$]"
Processing section "[volcano]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

:-(
 
Old 01-01-2010, 02:12 PM   #8
archaicDEBIANt
LQ Newbie
 
Registered: Aug 2009
Distribution: Debian and Arch
Posts: 17

Rep: Reputation: 0
Sorry for the confusion about writing /bin/false there. I assume there is only one samba user and that is the user of the Linux box...so adding users in /bin/false is not needed anymore. But anyway, can we do an ls -la on your shared path. Just to check.
 
Old 01-02-2010, 09:40 AM   #9
tebucky
Member
 
Registered: Mar 2004
Posts: 89

Original Poster
Rep: Reputation: 15
Here is the ls -la

drwxrwxrwx 5 root root 4096 2009-12-23 08:15 volcano

That's the share, I want everything underneath it to be be read, write and executable.

Thank you so much
 
Old 01-03-2010, 09:10 PM   #10
archaicDEBIANt
LQ Newbie
 
Registered: Aug 2009
Distribution: Debian and Arch
Posts: 17

Rep: Reputation: 0
Man, I tried duplicating your setup in my laptop. It works fine though. Here's my conf....

[TEST]
path = /test
valid users = visitor
read list =
write list = visitor
read only = no
browseable = yes
create mask = 0775
force create mode = 0775
directory mask = 0775
force directory mode = 0775

I can write in that folder test just fine from a remote M$ machine. I did chmod -R 777 to the test folder making the privilege absolute even to its subfolders.

Also, can we check your samba packages? I remember having somewhat the same prob back then because I miss a package related to samba...I don't know it might be just my distro. Here are my samba packages....

dpkg -l | grep samba

ii samba 2:3.4.3-1 SMB/CIFS file, print, and login server for Unix
ii samba-common 2:3.4.3-1 common files used by both the Samba server and client
ii samba-common-bin 2:3.4.3-1 common files used by both the Samba server and client

I can suggest to make a test folder in your /home or /home/shared then own and group it to the only samba user (which I presumed the user of your Linux box). You can have chmod even just 755 and even without the -R condition. Then let's see what would happen. Thanks!
 
Old 01-04-2010, 07:07 PM   #11
tebucky
Member
 
Registered: Mar 2004
Posts: 89

Original Poster
Rep: Reputation: 15
Here you go
root@chach:/home/user# dpkg -l |grep samba

ii samba 2:3.3.2-1ubuntu3.2 SMB/CIFS file, print, and login server for U

ii samba-common 2:3.3.2-1ubuntu3.2 common files used by both the Samba server a


Looks like I'm missing something?
 
Old 01-05-2010, 03:08 AM   #12
archaicDEBIANt
LQ Newbie
 
Registered: Aug 2009
Distribution: Debian and Arch
Posts: 17

Rep: Reputation: 0
Try getting samba-common-bin...the restart the samba service and feedback what would happen upon accessing your Linux box from your M$ machine.
 
Old 01-05-2010, 06:35 AM   #13
tebucky
Member
 
Registered: Mar 2004
Posts: 89

Original Poster
Rep: Reputation: 15
I'm a complete newbie and feel stupid asking this but how do I get the samba-common-bin file via the command line?
 
Old 01-06-2010, 01:52 AM   #14
archaicDEBIANt
LQ Newbie
 
Registered: Aug 2009
Distribution: Debian and Arch
Posts: 17

Rep: Reputation: 0
Sorry for the confusion. What I mean there is install the samba-common-bin via apt-get. For sudoers, like you, "sudo apt-get install samba-common-bin" (without the quote).
 
Old 01-06-2010, 06:55 AM   #15
tebucky
Member
 
Registered: Mar 2004
Posts: 89

Original Poster
Rep: Reputation: 15
I get this error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package samba-common-bin
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Very Basic Samba Setup DukieJF Linux - Newbie 3 01-28-2006 04:25 PM
FC4, SAMBA & WinXP home basic setup help please?! :) KevinAlaska Linux - Networking 3 11-09-2005 10:53 AM
Basic Samba Setup aeuzent Linux - Networking 4 09-27-2005 02:02 PM
Basic Apache Setup Help KungFuHamster Linux - Networking 10 11-04-2003 12:45 PM
Need help with basic setup CodeWarrior Slackware 3 05-10-2003 09:06 PM

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

All times are GMT -5. The time now is 02:04 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration