Linux - NewbieThis 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
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.
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.
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.
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'.
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.
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 {} \;
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.