CentOS 5 :: Rsync To A Samba Share Ignores Force Create Mode?
Jan 12, 2011
Have an issue with my CentOS server. I have a fully updated Centos 5.5 server and I have samba set up to serve shares to a couple of groups in my home office. I have it set up to force user/group and force directory create mode 770 and force file mode of 770. This set up works perfectly well for normal connections to the server; no matter who connects, all files and directories are owned by the specified users/group and create modes I specify. The problem is when I try to rsync some files to the same shares. When I do this, rsync ignores the directory/file forced create mode. It will honor the user/group, however. As an example, if I create a directory on one machine connected to the samba share, I get the following:
I don't think it has anything to do with the config file. More to do with SElinux. I need to know how to configure SElinux so I can see my samba share when SELinux is on. When I setenforce 0 I can seen all the files and folders set it to setenforce 1 cannot see anything.
Here is the output when I ran [root@fileserver /]# getsebool -a | grep smb allow_smbd_anon_write --> on smbd_disable_trans --> on
These two options were off I tried turning them on.
This is another one of the commands I tried running. I did change a few options but I am not sure which I do need to change. I am running a stand alone server so I don't need the DC option.
[root@fileserver /]# getsebool -a | grep samba samba_domain_controller --> off samba_enable_home_dirs --> off samba_export_all_ro --> on samba_export_all_rw --> off samba_share_nfs --> off use_samba_home_dirs --> on
How to create a smb share without prompting win users for a password?
Following is my smb.conf.
I have added a user called ux_share in the system and created the /home/ux_share/share with the right permission. And created the smbuser ux_share too.
Now when I try to access the share from a winbox it prompts for the passw.This share is likely to access by several winusers and i have no idea about thier workgroup names whatsoever. This is just a simple share im trying to publish just like an annonymous vsftpd account.
I can not edit my own .ppt file from samba share. Current desktop OS is windows 7. Samba server having RHEL 5 with following samba packages installed.
Code: libsmbclient0-3.5.6-43.el5 pam_smb-1.1.7-7.2.1 pam_smb-1.1.7-7.2.1 I can able to edit and save the file if I copy this file from samba to local system. But from Samba share it open in read only mode.
I am trying to create a Samba share on Ubuntu so that I can see it on my Windows computer but have had nothing but trouble. I've tried everything that I could find in Google but the best I can get is that my Ubuntu computer shows up as Unknown device on my Windows computer. Unfortunately, my Windows computer belongs to my company or I would just switch to Ubuntu altogether. I have posted a couple of screenshots of what I see in Windows, my GParted partitions, and the options that I have enabled for the folder I am trying to share. Below are my fstab and my samba files from Ubuntu. I am sure that this is just some rookie mistake as I am new to Ubuntu. It certainly seems that this should be easy, but I just can't get it.
I feel ashamed for even asking this, since it seems like there's about 3 samba questions here every day. However after an hour of searching, I keep finding strange variants that aren't what I need.
My Goal: Create a single file share on an Ubuntu Server - share it via samba to Windows clients that are on a domain with active directory. It sure would be nice if AD authentication would work - so users don't have to type in a linux user/passsword each time they want to access the share.
In my adventures, I've found the following items (which may overlap)
1. Joining the server to a Windows Domain
2. Turning the server into a Windows Domain Controller
3. Authentication with LDAP (still not quite sure how/what this would do)
4. Stuff with Kerberos
5. Lots of people bickering about Samba 3/4 & how it's impossible to make Samba a PDC.
I'm not sure if I need to make the ubuntu server a domain controller or not...all I want to do is create a file share and share it on the domain...I don't need to make the ubuntu server a domain controller for that, right? Maybe just a member? Maybe nothing at all?
I guess if I want to authenticate stuff correctly (or forward authentication requests? Not sure), I probably need to join the ubuntu server to the domain...I think.
But let's say I do join it to the domain...then how to I create a file share that is authenticated via active directory rather than a local ubuntu server account? I see a dozen guides on joining the server to the domain, but nobody ever mentions sharing the folder over the domain.
The lines are also blurred between joining Ubuntu to the domain and making it a domain controller. What should I keep an eye out to avoid in these tutorials?
I get lost between the Kerberos/LDAP/Samba/WinBind etc...and I have a feeling I don't need all of these for something this simple.
I'm trying to create a CentOS based liveCD that mounts a NFS share and executes one script there. The NFS never mounts altough while logged I can mount it with the very same command that I use in the KS.
In the %post I have :
%post --log=/tmp/post.log --erroronfail mkdir /mnt/nfs mount -o nolock 10.23.1.1:/csc/RemoteHome /mnt/nfs
I added the --log in order to debug, but nothing is written in /tmp/post.log. I tried redirection on the mount command with >> /tmp/debug.log but this is not written. Maybe during the post sequence /tmp is RO ? Anyway, I tried with ifup lo, service portmap start in the %post, but doesnt change (I even have a service : command not found in the live cd creator output).
Here is the remainder of the KS : lang en_US.UTF-8 keyboard us timezone US/Eastern
I'm trying to set up a test system for Windows 7. I've been having trouble getting it to map drives on the domain where I work, so I wanted to set up a test system with a similar setup so I can play around with settings without mucking up our network. Only problem is I can't get it configured to even work with XP, which does work on our domain.
When I type \server in the Run box I get the explorer window showing all of the test shares I've set up. But when I try to access them, it says the network path could not be found. Here is my smb.conf file:
[global] workgroup = MAJOR netbios name = VPN realm = MAJOR.COM
I am trying to mount a file server directory on a client machine. I tried using NFS, but could not mount the share on the client. Several respobses were given to a post on this problem. but I still was not able mount the NFS share. I decided to try instead to mount the directory as a Samba share because I can already access it using Samba from windows, or from KDE or Gnome using smb://fileserver as a desktop location icon URL. When I try to mount the Samba share I get error messages that nearly identical those that occurred with NFS. . Here are some of the setup parameters
CentOS 5.4 on client and server behind a D-Link router server IP: 192.168.0.44 (can ping it client) client IP: 192.168.0.101 (can ping from server)
This is the only error message that these commands have produced in the messages log, secure log or smbd log for either machine. My immediate goal is to set up the simplest possible local mount that will allow Grsync to backup to the file server.
I have set up a Samba share via my CentOS 5 server (the samba share is actually a mounted filesystem, not local machine space). I have been successful in adding permissions for my windows users within the smb.conf, but have an additional need that I cannot figure out. I would like for my Windows administrators to be able to create folders and assign permissions from their machines (and their Windows GUI). Ultimately I need the folders on the Samba share to behave correctly when Windows group permissions are applied by these administrators.
When the folders are created, the "Everyone" identity cannot be deleted and sometimes "Creator Owner" or "Creater Group" show up. I have seen several threads start down this path, but haven't seen a definite answer (I may have just missed it!).
I don't think it has anything to do with the config file.More to do with SElinux. I need to know how to configure SElinux so I can see my samba share when SELinuxis on. When I setenforce 0 I can seen all the files and folders set it to setenforce 1 cannot see anything.Here is the output when I ran [root@fileserver /]# getsebool -a | grep smballow_smbd_anon_write --> onsmbd_disable_trans --> onThese two options were off I tried turning them on.This is another one of the commands I tried running. I did change a few options but I am not sure which I do need to change. I am running a stand alone server so I don't need the DC option.
[root@fileserver /]# getsebool -a | grep samba samba_domain_controller --> off samba_enable_home_dirs --> off
I've to make a Windows 2000 share on my Server Linux CentOS 5.1 with all the updates installed with yum. I've a directory on a Windows 2000 that contains some images for a catalogue. I have my internet site on CentOS 5.1 with a Apache - Mysql - PHP web server. I have to mount my directory on a share in /mnt/catalogueimages and made a symbolic link from my /var/www/html/mysite/catimages to this samba share.
This is what I do following your guide a this link: [URL] I have placed in my /etc/fstab this line: //SERVER/C/Catalogue /mnt/catalogueimages cifs user,username=Administrator,password=,uid=apache,gid=apache 0 0 My Windows 2000 server have no password.
After that I made the symbolic link: ln -s /mnt/catalogueimages /var/www/html/mysite/catimages All it's OK.
The problem is that I can't see the images via browser. I have tried also to put some images in the directory /mnt/catalogueimages, deleting the mount point, in order to see if the problem was in apache: the images are visible via browser. Why I don't reach to see the images mounted with samba?
cannot restrict share access to a single user. I've played with the security and valid users options in the smb.conf and I can get it to mount if I remove the valid users option, but this does not provide the access restriction I need. I also left it open and tried making the folder permissions rwx for backupadmin only and that didn't work. I'm using a credentials file which I include below, but I've tried manually entering them in the command too.
[root@aaphst02 /]# mount -t cifs //aapsan01/aapxen01 /mnt/aapxen01 --verbose -o credentials=/root/smbcreds mount.cifs kernel mount options: unc=//aapsan01aapxen01,ip=10.0.1.34,user=backupadmin,ver=1,rw,credentials=/root/smbcreds,pass=********
I just installed my HP DeskJet 1220C printer on my CentOS 5.2 server, and it's working apart from one GIANT issue: It only prints from my Windows machines via its Samba share. It won't print from any of my Linux machines, not even the machine itself. I seem to be stumped here, I cannot find a reason why its doing this.
The file permissions on the folder are RW for user,group and world.(umask=0000) My main problem is with SELinux, I've tried to audit2allow and that seemed to work, all I had to do then was chcon the directory and files to type samba_share_t but the tool fails with Operation Not Supported. Am I to assume you simply cannot share files from a mounted ntfs drive under SELinux? Because I've just spent 2 hours trying and I've just about ready to just give up and just go back to windows when I need to share those folders. There's no way i can copy the folder contents to my Linux partition, far too big for that. Has anyone EVER been able to do this? Do I have to disable SELinux to do it?
I have Linux installed on one machine with samba running and a second machine running XP. They are going through my router and I am using the same username/passwords for both machines and I have even gone to the point of allowing access to everyone for the share I created and the worgroup in samba is MSHOME just like my XP machine. When I view (or search) my workgroup computers my Linux machine shows up and so do the shares I created but when I try to open them I just get a message that permission is denied and I may not have permission to use this resource. I even tried setting access to the shared folder to 777 but still I can't open this share. Has anyone got any idea of why this is?
I installed Samba on CentOS, create a principal share called "public" . I want to populate this share with subfolders, and to grant access rights to specific folders for specific users. The content of "public" will be visible for all Samba users, but they will have read/write access only to the specified subfolders based on my security policy. I need the best way for doing this kind of stuff...
However - is there such a thing as a decent HTML editor like dreamweaver? Komposer is buggy as hell - useless! Bluegriffon, well umm - screen fonts are bizarre, especially in viewing source code - brake down, multicoloured obviously a bug - no deb either, looks like a windows program install (?). This does look really good, but is unusable as I cant see in souce code view without getting a headache! Also, ignores css on links.
Seamonkey - you have to open browser then editor, then open your file. Ignores css totally. Amaya - ignores used fonts unless you re-edit - and ignores css on links. Weird way to select things as well, such as images. There must be at least one decent editor?
I can't be the first one with this problem. What am I missing?
I have setup Samba servers in the past, just none under SELinux. The last one I configured was a couple years ago, so I wouldn't doubt I'm a bit rusty.
---- Environment summary: Clean server install of CentOS 5.4 includes SELinux - lets call this 'server' - updated samba to 3.0.33-3.15.el5_4.1
Client1 - Windows XP sp4 - WINS configuration uses 'server' noted above Client2 - Windows Vista - WINS configuration uses 'server' noted above
---- What works / what doesn't ------ Clients can see the server (XP and vista) in network neighborhood. The following does not work from windows (xp or vista) net view net view \server net view \server-ip net view \servershare
This does work on the server smbclient -L \server smbclient -L \server --user validuser smbclient -L \client1 --user validuser
---- What I have configured and tried (config/output below) -------- firewall ports for samba are open SELinux enforcing or permissive file context is set on share samba booleans are set
***firewall -A RH-Firewall-1-INPUT -s 192.168.0.0/24 -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT -A RH-Firewall-1-INPUT -s 192.168.0.0/24 -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT -A RH-Firewall-1-INPUT -s 192.168.0.0/24 -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT -A RH-Firewall-1-INPUT -s 192.168.0.0/24 -m state --state NEW -m tcp -p udp --dport 139 -j ACCEPT
***SELinux mode/booleans # sestatus SELinux status: enabled SELinuxfs mount: /selinux Current mode: permissive Mode from config file: enforcing Policy version: 21 Policy from config file: targeted
# getsebool -a | grep smb allow_smbd_anon_write --> off smbd_disable_trans --> on
# getsebool -a | grep samba samba_domain_controller --> on samba_enable_home_dirs --> on samba_export_all_ro --> off samba_export_all_rw --> off samba_share_fusefs --> off samba_share_nfs --> off use_samba_home_dirs --> on virt_use_samba --> off
I'm trying to set up a VPN connection between our CentOS 5.3 server at work and my bosses XP computer at home. At this point, we are kinda locked into Quickbooks. I'm testing the connection from my XP boot at home to see if it works. I can log into our servicemanuals easily enough from XP at home however, the windows takes forever to update. I have the Samba server only listening on port 445 because is seems to work more efficiently at work. I connect to the Samba shares via linux from home and everything works well but, when I try to do anything with the shares from Windows client at home, it's very slow!
I'm thinking that it must have something either to do with the Windows OpenVPN client or the client.conf file. Is there anything I should look at in the .conf file for answers?
I'm trying to set up quota limit in samba-3.0.33-3.15.el5_4.1 in CentOS 5.5, by means of the module vfs objects. In the samba howto  I found a very brief explanation, but it isn't working for me. The basic idea is to setup a user called 'quota2g' (uid 499) and setup the [homes] share, as it comes by default, to enforce the quota on each user share.quota2g:x:499:499:User quota 2GB:/home/quota2g:/bin/bash
Linux 2.6.34-12-desktop x86_64smbd: 3.5.4-4.1-2382-SUSE-SL11.3I updated from v11.2. to v11.3.However, the SMB services were no longer mounted. The reason is that the "credentials" (or "cred") option in </etc/fstab> is ignored. If I remove "credentials" and add "username=xxx,password=yyy", the services are mounted.Has "credentials" been changed in some way? Has it been renamed?
I am attempting to share a folder from an existing drive that has been formatted in NTFS. I simply right click on the folder, goto share, and I can see the option to share to UNIX and that works with no problems. My question is; why is the SAMBA sharing dialog grayed out?
I've just installed Ubuntu 9.10 and Samba 3.4. I've shared a folder and have accessed the share from a Windows 7 client. However, I've struggled to configure the share and folder so that the Win7 client can create files and/or folders in the share. Kept getting Permission Denied errors. Finally, (using Webmin) I set the permissions on the file folder so that "Other" had write access. I don't understand why this was necessary (and how unsecure this is). I already had the write access checkbox ticked for "User" but it wasn't enough.
Start>Run>\192.168.0.1storage gives me "The specified network password is not correct." It lists my domain as "ANTEC" which is the name of my computer, though I've changed the workgroup to WELLS. I've run:
I have a problem with my newly installed ATI driver so my Fedora 12 boots to a frozen graphic mode display.I need to force it to boot to text mode interface to start adjusting my X configuration. What to do?This is a new Fedora 12 installation without any change to GRUB etc.