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? |
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.
|
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 |
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! |
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? |
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.
|
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 :-( |
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.
|
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 |
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! |
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? |
Try getting samba-common-bin...the restart the samba service and feedback what would happen upon accessing your Linux box from your M$ machine.
|
I'm a complete newbie and feel stupid asking this but how do I get the samba-common-bin file via the command line?
|
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).
|
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 10:08 AM. |