Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-07-2004, 05:19 PM   #1
LQ Newbie
Registered: May 2004
Distribution: ubuntu
Posts: 7

Rep: Reputation: 0
Question can't create/modify files in a samba share

I've set up a samba share under mandrake 9.1(2.4.21-0.13mdk) using samba 2.2.7a, I can browse to it from my windows and linux machines, view files, copy, delete and rename but I cannot modify the contents or create new files. I've checked everything to do with samba and even un-installed samba-common and samba-server then re-installed the packages, re-setup the shares and the same thing happens. It comes up with a message saying "no space left on drive", but there is over 7gig free... when I try to modify files it says "access denied".

the directory i'm sharing (/home/storage) is owned by nobody:nogroup has rwxrwxrwx. I've tried setting the share to force user = nobody and force group = nogroup.

this used to work but I live with a house full of geeks who like to login to the linux server and play around, and i'm not a linux guru by any stretch of the imagination. not sure what I should be checking in regards to samba/user access/?

smb.conf below

Cheers for any help.

# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#======================= Global Settings =====================================
log file = /var/log/samba/log.%m
smb passwd file = /etc/samba/smbpasswd
load printers = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
map to guest = bad user
encrypt passwords = yes
printer admin = @adm
dns proxy = no
server string = Samba Server %v
printing = cups
workgroup = WORKGROUP
os level = 20
printcap name = cups
security = user
max log size = 50

comment = Home Directories
browseable = no
writable = yes
# You can enable VFS recycle bin on a per share basis:
# Uncomment the next 2 lines (make sure you create a
# .recycle folder in the base of the share and ensure
# all users will have write access to it. See
# examples/VFS/recycle/REAME in samba-doc for details
; vfs object = /usr/lib/samba/vfs/
; vfs options= /etc/samba/recycle.conf
# You may want to prevent abuse of your server disk space, and spread of virii
; veto files = /*.eml/*.nws/*.dll/*.mp3/*.MP3/*.mpg/*.MPG/*.vbs/*.VBS/

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no

#Uncomment the following 2 lines if you would like your login scripts to
#be created dynamically by ntlogon (check that you have it in the correct
#location (the default of the ntlogon rpm available in contribs)
;root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon/
;root postexec = rm -f /var/lib/samba/netlogon/%U.bat

# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes
; writable = yes
# This script can be enabled to create profile directories on the fly
# You may want to turn off guest acces if you enable this, as it
# hasn't been thoroughly tested.
; root preexec = PROFILE=/var/lib/samba/profiles/%u; if [ ! -e $PROFILE ]; \
; then mkdir -pm700 $PROFILE; chown %u.%g $PROFILE;fi

# NOTE: If you have a CUPS print system there is no need to
# specifically define each individual printer.
# You must configure the samba printers with the appropriate Windows
# drivers on your Windows clients. On the Samba server no filtering is
# done. If you wish that the server provides the driver and the clients
# send PostScript ("Generic PostScript Printer" under Windows), you have
# to swap the 'print command' line below with the commented one.
comment = All Printers
path = /var/spool/samba
browseable = no
# to allow user 'guest account' to print.
guest ok = yes
writable = no
printable = yes
create mode = 0700
# =====================================
# print command: see above for details.
# =====================================
print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
; print command = lpr-cups -P %p %s -r # using cups own drivers (use generic PostScript on clients).
# The following two commands are the samba defaults for printing=cups
# change them only if you need different options:
; lpq command = lpq -P %p
; lprm command = cancel %p-%j

# This share is used for Windows NT-style point-and-print support.
# To be able to install drivers, you need to be either root, or listed
# in the printer admin parameter above. Note that you also need write access
# to the directory and share definition to be able to upload the drivers.
# For more information on this, please see the Printing Support Section of
# /usr/share/doc/samba-<version>/docs/Samba-HOWTO-Collection.pdf
path = /var/lib/samba/printers
browseable = yes
read only = yes
write list = @adm root
guest ok = yes

# A useful application of samba is to make a PDF-generation service
# To streamline this, install windows postscript drivers (preferably colour)
# on the samba server, so that clients can automatically install them.

path = /var/tmp
guest ok = No
printable = Yes
comment = PDF Generator (only valid users)
#print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP doc_name &
print command = /usr/share/samba/scripts/print-pdf %s ~%u //%L/%u %m %I "%J" &

# This one is useful for people to share files
; comment = Temporary file space
; path = /tmp
; read only = no
; public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
; comment = Public Stuff
; path = /home/samba/public
; public = yes
; writable = no
; write list = @staff
# Audited directory through experimental VFS module:
# Uncomment next line.
; vfs object = /usr/lib/samba/vfs/

# Other examples.
# A private printer, usable only by Fred. Spool data will be placed in Fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
; comment = Fred's Printer
; valid users = fred
; path = /homes/fred
; printer = freds_printer
; public = no
; writable = no
; printable = yes

# A private directory, usable only by Fred. Note that Fred requires write
# access to the directory.
; comment = Fred's Service
; path = /usr/somewhere/private
; valid users = fred
; public = no
; writable = yes
; printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %u option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
; comment = PC Directories
; path = /usr/pc/%m
; public = no
; writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
; path = /usr/somewhere/else/public
; public = yes
; only guest = yes
; writable = yes
; printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
; comment = Mary's and Fred's stuff
; path = /usr/somewhere/shared
; valid users = mary fred
; public = no
; writable = yes
; printable = no
; create mask = 0765

comment = mmmm space
writeable = yes
public = yes
path = /home/storage

Last edited by deadslota; 08-07-2004 at 05:26 PM.
Old 08-07-2004, 05:38 PM   #2
LQ Newbie
Registered: Aug 2004
Location: Milano, MI, Italy
Distribution: Whitebox
Posts: 9

Rep: Reputation: 0
blatant repeated advertising removed

Last edited by Tinkster; 09-03-2004 at 10:56 PM.
Old 08-07-2004, 06:37 PM   #3
LQ Newbie
Registered: May 2004
Distribution: ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
theres an english version? that looks italian or something ;P couldn't find an answer on there either

Last edited by deadslota; 08-07-2004 at 07:26 PM.
Old 08-07-2004, 10:51 PM   #4
LQ Newbie
Registered: Jul 2004
Distribution: RedHat9
Posts: 6

Rep: Reputation: 0
Your SAMBA user's must also have a valid Linux account to be able to create and copy files to the SAMBA share.
Old 08-07-2004, 11:26 PM   #5
Registered: Jul 2004
Location: Perth , Western Australia
Distribution: Fedora Core 5 , Mint 9
Posts: 118

Rep: Reputation: 15
Quote deadslota :
I've set up a samba share under mandrake 9.1(2.4.21-0.13mdk) using samba 2.2.7a, I can browse to it from my windows and linux machines, view files, copy, delete and rename but I cannot modify the contents or create new files.


Has no netbios name

comment = Home Directories
browseable = no
writable = yes

Homes has no path to directory , this is why you are having problems
browseable should be =yes


Have you set up any user accounts for the networked machines ?

The best way of getting a smb.conf file to work is to make a copy of the original conf file and call it smb.conf.old , and then with the file that you are trying to get to work , remove all the commented out stuff and any other stuff that you don't need, this makes it a whole lot easier to read and to get working.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Using samba to create share on mandrake ALInux Linux - Software 5 04-22-2005 02:43 PM
Cannot create files on samba share jhoderd Linux - Software 2 01-04-2005 09:46 AM
Don't share .files with Samba objorkum Linux - Software 1 02-28-2004 08:48 AM
Cannot create, modify, or write to Samba shares mpriddy Linux - Software 4 02-18-2004 11:40 AM
ok i giv eup on samba, i want to create an ftp share now...vsftpd rvn Linux - Newbie 3 10-10-2003 02:45 PM

All times are GMT -5. The time now is 06:31 PM.

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