LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-04-2009, 01:43 AM   #1
roozbeh
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Rep: Reputation: 0
no write access to subfolders of samba share


Hi.

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.

tnx

Last edited by roozbeh; 12-04-2009 at 11:10 AM.
 
Old 12-04-2009, 08:18 PM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
well, i'm wondering is there a reason that you are using an NTFS partition for this? Samba can work just as easily with ext3?
 
Old 12-05-2009, 03:24 AM   #3
roozbeh
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Original Poster
Rep: Reputation: 0
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.


PS. so does this mean my shares look ok?

thanks.
 
Old 12-06-2009, 07:57 PM   #4
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
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?
 
Old 12-06-2009, 08:01 PM   #5
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
Code:
[docs-dave-laptop]
	path = /home/dave/Documents
	writeable = yes
;	browseable = yes
	valid users = dave

[dave-pics]
	path = /home/dave/Pictures
;	writeable = no
;	browseable = yes
	valid users = dave
This is a snippet from my smb.conf, hope it might help you along.
 
1 members found this post helpful.
Old 12-07-2009, 09:31 AM   #6
roozbeh
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Original Poster
Rep: Reputation: 0
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.

Last edited by roozbeh; 12-07-2009 at 11:25 AM.
 
Old 12-07-2009, 03:54 PM   #7
Sum1
Member
 
Registered: Jul 2007
Distribution: Fedora, CentOS, and would like to get back to Gentoo
Posts: 332

Rep: Reputation: 30
Quote:
Originally Posted by roozbeh View Post
thank you.
i wanted to allow every user have access to my shares.
If you really want to insure all samba users have read/write access, you can su to root and do ~$chmod -R 0777 /media/MEDIA

and the put the following into your [DriveD] parameters:

create mask = 0777
directory mask = 0777
security mask = 0777
directory security mask = 0777


Everyone can certainly jump in the pool to read write and execute once this is set.

HTH
 
Old 12-07-2009, 04:20 PM   #8
kschmitt
Member
 
Registered: Jul 2009
Location: Chicago Suburbs
Distribution: Crux, CentOS, RHEL, Ubuntu
Posts: 96

Rep: Reputation: 23
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.
 
Old 12-08-2009, 07:35 PM   #9
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
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.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 01:35 AM
Write Only access to samba share ? nathan2225 Linux - Software 0 11-08-2007 02:21 AM
mounted NT Samba share write access problems dm215 Linux - Software 1 01-08-2007 11:40 AM
Why can I not write to a SAMBA share when read/write is enabled? eric m Linux - General 4 08-21-2006 09:22 PM
Map to share then allow users to access subfolders problem in SAMBA ryanzietlow Linux - Software 1 03-26-2004 06:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration