Welcome Guest! To access all forums & features, please register an account or sign-in. → Why register?



Samba Shares - ARGH!


8 replies to this topic - - - - -

#1 hougtimo

    Neowinian³

  • 430 posts
  • Joined: 08-May 05

Posted 08 April 2012 - 10:22

I've been reading up on samba shares. So I popped CentOS onto a VM and got busy.

At first I tried configuring it all myself using smb.conf ... the result was my windows pc would see the share, log in, but would not show the contents of the shared folder, or allow me to write with it.

So I gave up, reformatted, and used webmin instead.

I've got the same result.

I've checked unix user permissions, ownership, samba user/passwords. It's definitely writeable. Windows will open the folder, but not show the contents or allow me to write to it. I just get "This folder is empty" from windows explorer

:(

Help?


#2 Miuku.

    A damned noob

  • 4,885 posts
  • Joined: 10-August 03
  • Location: Finland, EU
  • OS: :: OS X :: SLES ::

Posted 08 April 2012 - 10:29

Did you check the logs? ;-)

I'm not quite sure where CentOS keeps them but SLES/SuSE has them in /var/log/samba/log.smbd

Just tail the file when trying to access the directory.

#3 Site Lab

    Professional Graphics Design

  • 212 posts
  • Joined: 23-August 11
  • Location: Manchester, England
  • OS: Windows 8 Consumer Preview

Posted 08 April 2012 - 10:30

1. Look at this: http://www.cyberciti...nder-linux.html

Also, is it possible to right click a folder on the desktop and click Share Folder?

If all of this fails (in fact try this first) chmod the folder to 777 (bit of a security risk but heh). So chmod 777 <folder name/path>

#4 OP hougtimo

    Neowinian³

  • 430 posts
  • Joined: 08-May 05

Posted 08 April 2012 - 10:33

View PostSite Lab, on 08 April 2012 - 10:30, said:

1. Look at this: http://www.cyberciti...nder-linux.html

Also, is it possible to right click a folder on the desktop and click Share Folder?

If all of this fails (in fact try this first) chmod the folder to 777 (bit of a security risk but heh). So chmod 777 <folder name/path>
1st link seems to be the wrong way round. I'm trying to share a folder from CentOS to Windows.
2nd no, terminal only.
3rd already tried

#5 OP hougtimo

    Neowinian³

  • 430 posts
  • Joined: 08-May 05

Posted 08 April 2012 - 10:35

View PostMiukuMac, on 08 April 2012 - 10:29, said:

Did you check the logs? ;-)

I'm not quite sure where CentOS keeps them but SLES/SuSE has them in /var/log/samba/log.smbd

Just tail the file when trying to access the directory.
Logs - wiped them then logged in and tried to copy a file.

[2012/04/08 06:34:37.200963,  1] smbd/service.c:1251(close_cnum)
  __ffff_192.168.1.84 (::ffff:192.168.1.84) closed connection to service share1
[2012/04/08 06:34:37.215009,  1] smbd/service.c:1251(close_cnum)
  __ffff_192.168.1.103 (::ffff:192.168.1.103) closed connection to service share1
[2012/04/08 06:34:37.217456,  1] smbd/service.c:1251(close_cnum)
  __ffff_192.168.1.84 (::ffff:192.168.1.84) closed connection to service share1
[2012/04/08 06:34:37,  0] smbd/server.c:1140(main)
  smbd version 3.5.10-114.el6 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/04/08 06:34:37.951673,  0] smbd/server.c:500(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Address already in use
[2012/04/08 06:34:37.971517,  0] smbd/server.c:500(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Address already in use
[2012/04/08 06:34:38.302699,  1] smbd/service.c:1070(make_connection_snum)
  __ffff_192.168.1.84 (::ffff:192.168.1.84) connect to service share1 initially as user smbuser (uid=500, gid=500) (pid 4551)
[2012/04/08 06:34:38.442723,  1] smbd/service.c:1070(make_connection_snum)
  __ffff_192.168.1.103 (::ffff:192.168.1.103) connect to service share1 initially as user smbuser (uid=500, gid=500) (pid 4552)
[2012/04/08 06:34:44.387638,  1] smbd/service.c:1070(make_connection_snum)
  __ffff_192.168.1.84 (::ffff:192.168.1.84) connect to service share1 initially as user smbuser (uid=500, gid=500) (pid 4551)


#6 Miuku.

    A damned noob

  • 4,885 posts
  • Joined: 10-August 03
  • Location: Finland, EU
  • OS: :: OS X :: SLES ::

Posted 08 April 2012 - 10:48

Have you mapped the smbuser to a local user or do you have an account on the centos boxed called that?

It's clearly a permission issue or a user mapping problem.

#7 OP hougtimo

    Neowinian³

  • 430 posts
  • Joined: 08-May 05

Posted 08 April 2012 - 10:48

View PostMiukuMac, on 08 April 2012 - 10:48, said:

Have you mapped the smbuser to a local user or do you have an account on the centos boxed called that?

It's clearly a permission issue or a user mapping problem.
User on CentOS box called smbuser. Passwords on the centos box match with smbpasswd. Logging in on the windows box with the correct credentials.

#8 Miuku.

    A damned noob

  • 4,885 posts
  • Joined: 10-August 03
  • Location: Finland, EU
  • OS: :: OS X :: SLES ::

Posted 08 April 2012 - 10:52

There was one thing that popped into my mind, since I remember RedHat/CentOS using SELinux, this might help you;
http://wiki.centos.o...wTos/SetUpSamba

Take a peek at 2. SELinux

If it's merely a test box, you could also just try disabling SELinux (you should not do this on a production box however!)

#9 OP hougtimo

    Neowinian³

  • 430 posts
  • Joined: 08-May 05

Posted 08 April 2012 - 10:56

View PostMiukuMac, on 08 April 2012 - 10:52, said:

There was one thing that popped into my mind, since I remember RedHat/CentOS using SELinux, this might help you;
http://wiki.centos.o...wTos/SetUpSamba

Take a peek at 2. SELinux

If it's merely a test box, you could also just try disabling SELinux (you should not do this on a production box however!)
You utter genius!

Works perfectly, thank you very much indeedy!