centos 64bit Samba Web Administration Tool (SWAT)

Posted on 2011-10-07
Last Modified: 2012-05-12
Hello experts,

I have installed SWAT (Samba Web Administration Tool) using http://localhost.901/ able to log in and configure the settings. So far I have configured workgroup, netbios name and set up a shared folder. This is all done on centos64bit box.

Now using Windows I am able to see the shared folder and able to log in to it using the user name/password. However I am NOT able to create any files or folders in a new shared folder using a windows system. "You need permission to perform this action."

I can't figure out how to give that user permission to be able to create files inside that folder using Windows. I went as far as putting maximum permission on that folder for everyone: User, Group and Others ... still it will not let me.

Any advice would be highly appreciated.

Thank you.
Question by:ezdrt
    LVL 4

    Expert Comment

    by:Christopher Raymond Mendoza
    Hello ezdrt,

    Can you post your smb.conf file please.

    Author Comment

    # Samba config file created using SWAT
    # from UNKNOWN (
    # Date: 2011/10/07 16:31:58
    	netbios name = CENTOSLAPTOP
    	server string = Samba Server Version %v
    	security = DOMAIN
    	log file = /var/log/samba/log.%m
    	max log size = 50
    	wins support = Yes
    	template shell = /bin/bash
    	create mask = 0777
    	directory mask = 0777
    	valid users = %S
    	read only = No
    	browseable = No
    	path = /usr/test_share
    	valid users = testone
    	admin users = testone
    	force group = mycircles
    	read only = No
    	comment = All Printers
    	path = /var/spool/samba
    	printable = Yes
    	browseable = No

    Open in new window

    LVL 4

    Expert Comment

    by:Christopher Raymond Mendoza
    Hello ezdrt,

    The same thing happened to a colleague of mine last week. All his samba users have no equivalent linux account.

    Author Comment

    It looks like there are both Samba and Linux users. I would really appreciate some kind of advice maybe there is a way to check if something is missing, maybe I have not configured rights or maybe check if the users do not mach?
    LVL 4

    Accepted Solution

    It occured to me just now, is selinux enabled? Your share is found in the /usr folder, selinux might be stopping samba from writing into that folder.

    Also, can you please post the results of following commands:

        ls -lp --lcontext /usr

        cat /etc/passwd | grep testone

        cat /etc/group | grep testone


    Author Comment

    I did ran those commands and here is the output:
    [root@centos64bit /]# ls -lp --lcontext /usr
    total 140
    dr-xr-xr-x.   2 system_u:object_r:bin_t:s0       root    root    36864 Oct 11 03:47 bin/
    drwxr-xr-x.   2 system_u:object_r:etc_t:s0       root    root     4096 Nov 10  2010 etc/
    drwxr-xr-x.   2 system_u:object_r:usr_t:s0       root    root     4096 Nov 10  2010 games/
    drwxr-xr-x.  32 system_u:object_r:usr_t:s0       root    root     4096 Sep 30 09:13 include/
    dr-xr-xr-x.  14 system_u:object_r:lib_t:s0       root    root     4096 Sep 30 01:17 lib/
    dr-xr-xr-x.  87 system_u:object_r:lib_t:s0       root    root    40960 Oct 11 03:47 lib64/
    drwxr-xr-x.  21 system_u:object_r:bin_t:s0       root    root    12288 Sep 30 09:15 libexec/
    drwxr-xr-x.  12 system_u:object_r:usr_t:s0       root    root     4096 Sep 30 01:02 local/
    dr-xr-xr-x.   2 system_u:object_r:bin_t:s0       root    root    12288 Oct 10 16:06 sbin/
    drwxr-xr-x. 159 system_u:object_r:usr_t:s0       root    root     4096 Oct 10 16:06 share/
    drwxr-xr-x.   4 system_u:object_r:usr_t:s0       root    root     4096 Sep 30 01:02 src/
    drwxrwsr-x.   2 unconfined_u:object_r:usr_t:s0   userone usertwo  4096 Oct  7 12:24 test_share/
    lrwxrwxrwx.   1 system_u:object_r:usr_t:s0       root    root       10 Sep 30 01:02 tmp -> ../var/tmp/
    [root@centos64bit /]# cat /etc/passwd | grep testone
    [root@centos64bit /]# cat /etc/group | grep testone
    [root@centos64bit /]# 

    Open in new window

    LVL 4

    Assisted Solution

    by:Christopher Raymond Mendoza
    Hello ezdrt,

    Sorry for the late reply. Based on your last post is selinux is enabled you most probably won't be able to write to the share. Also, testone is not a Linux user, and in effect won't have proper access to the share too.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now