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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
12-28-2009, 09:33 AM
|
#1
|
Member
Registered: Mar 2004
Posts: 89
Rep:
|
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?
|
|
|
12-28-2009, 09:48 AM
|
#2
|
Member
Registered: Mar 2004
Posts: 89
Original Poster
Rep:
|
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.
|
|
|
12-28-2009, 04:20 PM
|
#3
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127
Rep:
|
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
|
|
|
12-28-2009, 09:11 PM
|
#4
|
LQ Newbie
Registered: Aug 2009
Distribution: Debian and Arch
Posts: 17
Rep:
|
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!
|
|
|
12-29-2009, 07:17 AM
|
#5
|
Member
Registered: Mar 2004
Posts: 89
Original Poster
Rep:
|
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?
|
|
|
12-31-2009, 02:31 AM
|
#6
|
LQ Newbie
Registered: Aug 2009
Distribution: Debian and Arch
Posts: 17
Rep:
|
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.
|
|
|
12-31-2009, 08:13 AM
|
#7
|
Member
Registered: Mar 2004
Posts: 89
Original Poster
Rep:
|
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
:-(
|
|
|
01-01-2010, 02:12 PM
|
#8
|
LQ Newbie
Registered: Aug 2009
Distribution: Debian and Arch
Posts: 17
Rep:
|
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.
|
|
|
01-02-2010, 09:40 AM
|
#9
|
Member
Registered: Mar 2004
Posts: 89
Original Poster
Rep:
|
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
|
|
|
01-03-2010, 09:10 PM
|
#10
|
LQ Newbie
Registered: Aug 2009
Distribution: Debian and Arch
Posts: 17
Rep:
|
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!
|
|
|
01-04-2010, 07:07 PM
|
#11
|
Member
Registered: Mar 2004
Posts: 89
Original Poster
Rep:
|
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?
|
|
|
01-05-2010, 03:08 AM
|
#12
|
LQ Newbie
Registered: Aug 2009
Distribution: Debian and Arch
Posts: 17
Rep:
|
Try getting samba-common-bin...the restart the samba service and feedback what would happen upon accessing your Linux box from your M$ machine.
|
|
|
01-05-2010, 06:35 AM
|
#13
|
Member
Registered: Mar 2004
Posts: 89
Original Poster
Rep:
|
I'm a complete newbie and feel stupid asking this but how do I get the samba-common-bin file via the command line?
|
|
|
01-06-2010, 01:52 AM
|
#14
|
LQ Newbie
Registered: Aug 2009
Distribution: Debian and Arch
Posts: 17
Rep:
|
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).
|
|
|
01-06-2010, 06:55 AM
|
#15
|
Member
Registered: Mar 2004
Posts: 89
Original Poster
Rep:
|
I get this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package samba-common-bin
|
|
|
All times are GMT -5. The time now is 02:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|