LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 11-29-2004, 07:09 PM   #1
sephiro499
Member
 
Registered: Sep 2003
Location: Baltimore, MD
Distribution: Fedora Core 8
Posts: 39

Rep: Reputation: 15
Unable to write to Samba Share


Hi all. I used the SWAT configuration utility to configure my SAMBA shares. I have 4 shares: Music, Television, Movies, and HTML. Everything works great from a read-only perspective, but I can only write to one of my shares. I went through the advanced list and compared my "Music" share (this is the only one I can write to) with my "Movies" share, and all of the options are filled out the same. The only difference I can think of is that the "Music" share is mounted on a seperate drive then the other 3 shares. I'm accessing the shares from my xp home notebook. Here is my config file, hopefully this post isn't too long.


[global]
workgroup = MDKGROUP
server string = Samba Server
security = SHARE
map to guest = Bad User
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = cups
dns proxy = No
printer admin = @adm
printing = cups

[homes]
comment = Home Directories
read only = No
browseable = No

[print$]
path = /var/lib/samba/printers
write list = @adm, root
inherit permissions = Yes
guest ok = Yes

[Music]
path = /mp3
write list = nobody
read only = No
guest ok = Yes

[Movies]
path = /home/sephiro500/Movies
write list = nobody
read only = No
guest ok = Yes

[Television]
path = /home/sephiro500/HTML
write list = nobody
read only = No
guest ok = Yes

[HTML]
path = /home/sephiro500/HTML
write list = nobody
read only = No
guest ok = Yes

I added the nobody to the read list, thinking that would fix my problem.
 
Old 11-29-2004, 09:06 PM   #2
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Does nobody have write access to the local filesystem?
 
Old 11-29-2004, 09:21 PM   #3
sephiro499
Member
 
Registered: Sep 2003
Location: Baltimore, MD
Distribution: Fedora Core 8
Posts: 39

Original Poster
Rep: Reputation: 15
I added the nobody because I thought that, since I don't need a username and password to access the shares, that the anonymous user by default was nobody.
 
Old 11-29-2004, 09:40 PM   #4
edcutis
Member
 
Registered: Jun 2003
Location: USA, Missouri
Distribution: mandriva , Kubuntu, MEPIS
Posts: 140

Rep: Reputation: 15
Try adding the line:

valid users = xxxxxxxx

to the affected share, where xxxxxxxxx equals your samba user name.

remember, use 'testparm' to sniff out problems, and 'smbclient -L localhost' to see your shares.

good luck!
 
Old 11-29-2004, 10:06 PM   #5
sephiro499
Member
 
Registered: Sep 2003
Location: Baltimore, MD
Distribution: Fedora Core 8
Posts: 39

Original Poster
Rep: Reputation: 15
But I don't have a samba user name, since I don't even have to supply username/password when I access the shares. I only added the 'nobody' because I thought that, an anonymous user was referred to as, 'nobody'.
 
Old 11-30-2004, 01:28 AM   #6
PseudoX
LQ Newbie
 
Registered: Nov 2004
Posts: 4

Rep: Reputation: 0
i had to chown the folders/file from root to my user if that helps.

im sure there is an easier way thou.

btw.. me=n00bie
 
Old 11-30-2004, 01:53 AM   #7
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
You have to change the directory and file permissions so that everybody can write to. If you want to make sure this does not happen again, you have to add additional settings to set the permissions to 666 for files and 777 for directories.

Under Music, Movies, Television, and HTML directories type
find directory path goes here -type d -exec chmod -v 777 {} \;
find directory path goes here -type f -exec chmod -v 666 {} \;

This will make sure all files and directories have the right permissions for nobody to read and write to.
 
Old 11-30-2004, 07:43 AM   #8
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Quote:
Originally posted by Electro

Under Music, Movies, Television, and HTML directories type
find directory path goes here -type d -exec chmod -v 777 {} \;
find directory path goes here -type f -exec chmod -v 666 {} \;
With all due respect, this is the wrong way to do this. world writable files are a big no no. Either chown -R nobody the directories or set up a group with nobody and your normal shell user in it and chgrp them to that group.

At most:

find directory path goes here -type d -exec chmod -v 775 {} \;
find directory path goes here -type f -exec chmod -v 664 {} \;

The world write bit should only be set on /tmp
 
Old 11-30-2004, 12:05 PM   #9
sephiro499
Member
 
Registered: Sep 2003
Location: Baltimore, MD
Distribution: Fedora Core 8
Posts: 39

Original Poster
Rep: Reputation: 15
I used the change ownership command and all works great. Thank you everyone for your help. This forum has been an INVALUABLE resource since my switch to a Microsoft-free lifestyle.
 
  


Reply


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
Can't write to Samba Share perihelion Linux - Software 21 03-12-2012 10:39 AM
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 01:35 AM
Can't write to Samba share erikcw Linux - Software 3 01-26-2005 03:59 AM
samba share with write but not delete Red Squirrel Linux - Software 7 08-29-2004 06:12 PM
Windows Unable to write to a network share??? Please help! shassouneh Linux - Networking 4 03-10-2002 05:02 PM


All times are GMT -5. The time now is 01:30 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration