Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using samba t share my files.I am sharing /media/MEDIA folder. it is a ntfs partition mounted with ntfs-3g with write/read access from linux.
I can see and browse my shares and also create files in the root of this partition, ie /media/MEDIA, but in its subfolders i do not have write permissions.
here is my samba.conf
Code:
#======================= Global Settings =======================
[global]
log file = /var/log/samba/log.%m
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\successfully* .
obey pam restrictions = yes
sync always = yes
username map = /etc/samba/smbusers
null passwords = yes
map to guest = Bad User
encrypt passwords = true
show add printer wizard = no
public = yes
passwd program = /usr/bin/passwd %u
wins support = true
netbios name = roozbeh-mint
inherit permissions = yes
writeable = yes
server string = %h Server
default = global
workgroup = WORKGROUP
os level = 20
auto services = global DriveD
security = share
syslog = 0
panic action = /usr/share/samba/panic-action %d
max log size = 1000
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
# server string is the equivalent of the NT Description field
#### Debugging/Accounting ####
# This tells Samba to use a separate log file for each machine
# that connects
# Put a capping on the size of the log files (in Kb).
# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
# Do something sensible when Samba crashes: mail the admin a backtrace
####### Authentication #######
; passdb backend = tdbsam
; guest account = nobody
# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
############ Misc ############
# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
; socket options = tcp_nodelay
#======================= Share Definitions =======================
[DriveD]
path = /media/MEDIA
also by default computer name is not shown in windows xp, i have to type its name or address to browse to it.
another interesting thing is that i have permission to create directory and delete files everywhere and in any folder, subfolder but when trying to create files i get not enough free disk space error.
any clues?
by the way i dont know if this config file is correct, i find as template in internet.
Well. I just moved from windows to linux, so all my datas are in ntfs partitions.
And i want to share them with my network and also my virtual machine with windows xp guest.
And as i still require somethimes to boot into my xp machine, converting ntfs partitions into ext3/ext4 are not a solution for me.
Hmm, your SAMBA file is a little heavy on the global definitions, and light on the share. I'm interested to know who would be allowed access to your share, since no-one is listed?
thank you.
maybe the reason for my globals being this much is that i wanted to allow every user have access to my shares.
i will try with yours and see what happens
is there anyway i can find why samba rejected to copy files? ie any log files?
the intresting thing is that i can copy small size files, like under 1kb but no more than that.
also copying other files always give me not enough disk space error in windows. so it seems samba wrongly think disk space is limited.
In big multi-user shares it's useful to use the force group option. Otherwise directories created by a user will default to their default group*. Here's a quick example for users in a PICTURES group. To get access to the share users would have to be in the PICTURES group, and any files they wrote or saved would default to being owned by that group. The create mask and directory mask take care of the rest (as suggested above), ensuring everyone in that group has access to read & write the files. The execute bit is setup because samba likes it**.
[PICTURES]
comment = Company Pictures
path = /export/PICTURES
valid users = @PICTURES
public = no
force group = PICTURES
writable = yes
create mask = 0770
directory mask = 2770
*Blatant oversimplification.
**Blatant oversimplification. Look at the samba docs about unix to windows permissions if you really want to know.
Hi again Roozbeh, I hope you got some good info from the other posts here. For me, if I was starting with a samba server like this, the first thing I would do is leave the global settings at default and slowly add features. The simplest way to allow everyone access to a share is to use
Code:
security = share
however, maybe some of the other things you have put in are working against that because they are meant for a more secure setup, for example
Code:
map to guest = Bad User
Anyhow, that is what I would do.
BTW, you have specified in the first line of your global section where your log file is,
Quote:
log file = /var/log/samba/log.%m
which I think you are looking for? Also, the disk space error happens on mapped shares when samba stops a copy happening, it is windows interpretation of bad permissions from samba.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.