Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Hi All, Newb here with both linux and centos I received a lot of help on this forum and got Centos 6.2 with gnome starting automatically on boot all is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2013
    Posts
    33

    CentOS and Samba


    Hi All,
    Newb here with both linux and centos I received a lot of help on this forum and got Centos 6.2 with gnome starting automatically on boot all is well. Now I want to use samba to share with windows xp box. I followed this tutorial I found and
    my windows box can see the MyShare folder but it wont let me access it. Says path not found or no permissions contact your admin.

    I think the guy who wrote the article had a typo in there. anyway I followed it until I became confused on what he was saying in the tutorial any help would be appreciated

    Thanks




    How to install Samba server on CentOS 6 Lazy Geek -

    #======================= Global Settings =====================================
    [global]
    workgroup = WORKGROUP
    security = share
    map to guest = bad user
    #============================ Share Definitions ==============================
    [MyShare]
    path = /samba/share
    browsable =yes
    writable = yes
    guest ok = yes
    read only = no

  2. #2
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    896
    For whatever reason, if you keep following that article, it tells you to set folder permissions after you have mapped the drive.

    chmod /samba/share 777 -R

    Note, this will make your directory world readable and writeable.

  3. #3
    Just Joined!
    Join Date
    Jan 2013
    Posts
    33
    Quote Originally Posted by mizzle View Post
    For whatever reason, if you keep following that article, it tells you to set folder permissions after you have mapped the drive.

    chmod /samba/share 777 -R

    Note, this will make your directory world readable and writeable.
    ================================================== =======

    Not sure what you are telling me directory world ?
    is this article accurate?
    Thanks

  4. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    I've only set up samba once so can't really help with that. My understanding is the workgroup name must be the same on Centos and windows.
    What mizzle is saying above is that if you give permissions as shown in the tutorial (he does indicate to check if it is permitted) anyone will be able to read, execute and write to any of the files including modifying or deleting them. If you are just setting this up on an enclosed LAN with no internet access to test it should not be a problem. Otherwise it will be. This is the command giving everyone those privileges:

    chmod /samba/share 777 -R

  5. #5
    Just Joined!
    Join Date
    Jan 2013
    Posts
    33
    Thanks for clearing up what Mizzle stated. On the tutorial I have the link to I don't understand some things.
    I can see the MyShare on my windows xp box but it wont let me connect.

    How to install Samba server on CentOS 6 Lazy Geek -


    Where did he name the server?
    Access the samba share from windows (where centos is the name of my samba server):

    Check the current permission on the samba share:
    I get an error here cd /etc/samba works. I think typo here
    cd /samba/
    ls -l
    Attached Images Attached Images

  6. #6
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    He doesn't specifically show it but he has created a directory for his server files named samba and your post above shows (cd /samba/) which is changing to that directory and the ls -l is checking permissions on files in it. You need to create a directory you want to share on CentOS. Have you done that? It looks like both a permission error and a failure to connect. The cd /etc/samba is where the configuration files are for samba on CentOS and you need to check whichever directory/folder you are sharing from CentOS.

  7. #7
    Just Joined!
    Join Date
    Jan 2013
    Posts
    33
    Quote Originally Posted by yancek View Post
    He doesn't specifically show it but he has created a directory for his server files named samba and your post above shows (cd /samba/) which is changing to that directory and the ls -l is checking permissions on files in it. You need to create a directory you want to share on CentOS. Have you done that? It looks like both a permission error and a failure to connect. The cd /etc/samba is where the configuration files are for samba on CentOS and you need to check whichever directory/folder you are sharing from CentOS.
    I did everything in the tutorial up to
    Save the smb.conf file and restart the service:

    sudo service smb restart
    sudo service nmb restart

    Then I am lost cause I cant do the following
    cd /samba/
    ls -l

    I get no such directory thats when I did cd /etc
    cd samba


    You need to create a directory you want to share on CentOS. Have you done that?

    I thought this was my share


    #======================= Global Settings =====================================
    [global]
    workgroup = WORKGROUP
    security = share
    map to guest = bad user
    #============================ Share Definitions ==============================
    [MyShare]
    path = /samba/share
    browsable =yes
    writable = yes
    guest ok = yes
    read only = no

    You know what strikes me as odd. I would think someone would have these config files all made up to have a newb use for a bare bones share on a windows box. I know that if I figure it out I will post one for sure showing what I did and I'm sure it will be a bare bones set up if when I get it

    I thing most people assume too much in these tutorials, like if I were to teach you how to make a tight curve on a motorcycle I wouldn't tell a newb "well all you have to do is counter steer and you will make it through the curve" cause a new motorcycle rider doesn't know what counter steering is.

  8. #8
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Then I am lost cause I cant do the following
    cd /samba/
    ls -l
    What that is showing is that the person who wrote the tutorial is planning to share one directory named samba. From the post, it would appear that it is in the / (that is the root of his filesystem of CentOS). Anything he planned to share with the windows computer(s) would be in the /samba directory. In your last post, you show "path = /samba/share. I expect that would mean you are planning to share file/folders in the /samba/share directory. Did you do that? If you did, you should be able to change to that directory with: cd /samba/share and the run: ls -l. If you didn't, you can create it as root with: mkdir /samba (hit the Enter key) and then do: mkdir /samba/share and then run: ls -l in the /samba directory.

  9. #9
    Just Joined!
    Join Date
    Jan 2013
    Posts
    33
    Quote Originally Posted by yancek View Post
    What that is showing is that the person who wrote the tutorial is planning to share one directory named samba. From the post, it would appear that it is in the / (that is the root of his filesystem of CentOS). Anything he planned to share with the windows computer(s) would be in the /samba directory. In your last post, you show "path = /samba/share. I expect that would mean you are planning to share file/folders in the /samba/share directory. Did you do that? If you did, you should be able to change to that directory with: cd /samba/share and the run: ls -l. If you didn't, you can create it as root with: mkdir /samba (hit the Enter key) and then do: mkdir /samba/share and then run: ls -l in the /samba directory.
    Found this link and it all works
    Installing and configuring samba on centos 6

    I can map the share in windows XP and copy files to it from Windows XP but now I cant open it in the CentOS box have to find out why

  10. #10
    Just Joined!
    Join Date
    Dec 2012
    Posts
    30
    How many users on the XP box need to connect to the share? If only one user, change the samba security so that only that user is authorized to the share and the documents created within it. To do that, change the security setting to security = user. Then add valid users = your_samba_user_name to the [MyShare] section.

    On my Fedora box, security = share isn't even a valid option. Not sure about CentOS.

    Lastly, the manual has a ton of information, including explaining all options within smb.conf:

    Code:
    man smb.conf

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •