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 have a samba share on one of my debian servers with the following section:
[Torrent]
writeable = yes
path = /path_to_downloads
public = yes
guest ok = yes
guest only = yes
guest account = nobody
browseable = yes
when i paste some files into the share or create a directory, from my linux laptop, everything went ok, but i am not able to delete the downloads from sabnzbd or torent, form my linux laptop.
What is the ownership and permissions of the directory and the files.
What is the value of "guest account ="?
Post the global part of smb.conf in code tags. Run testparm to check smb.conf's validity.
Code:
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP
# server string is the equivalent of the NT Description field
server string = %h server
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
# wins support = no
# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z
# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no
# What naming service and in what order should we use to resolve host names
# to IP addresses
; name resolve order = lmhosts host wins bcast
Show the output of "ls -ld path_to_downloads". Show the same for one of the files and one of the directories inside the share.
If you have the ownership of root and 0700 permissions, I'm surprised you can write to the directory. Only root has permissions, and the connection is made as "nobody" (guest user on the Windows side.)
It would be better to use user level security and configure the ownership and permissions the same as the /tmp directory. The client can save the credentials, so you can use user level security without needing the password every time. You could even create a user "torrent" on the server giving you the features of share level security.
Check out the book "Samba 3 by Example". It should be available on the samba.org website. If your distro has a samba-docs package, that contains a PDF version of the book as well. It contains step-by-step instructions for several types of services. Creating the directory with proper ownership and permissions, and adding users with smbpasswd are two often skipped steps.
If your distribution is Redhat Enterprise Linux then you can try out following thing.
if you are running Redhat Linux possible reason I know of is SELinux if it is in enforcing mode it will stop you from writing content on any folder which doesn't have appropriate security context on it.
run following command to view mode of selinux
Code:
$ getenforce
if output is some thing like this
Code:
$ getenforce
Enforcing
then you must run following command of your share directory
there is no ownership, for as far i know.
i created the dir Torrent by using root, and did chmod 777 Torrent, nothing else
in smb.conf, in section Homes
ceate mask = 0700
directory mask = 0700
If you have the files owned by root, the create mask MUST set the 'other' to 7 (rwx)
Since you are already using /path/to/Torrent as chmod 777, you might as well set new items to the same (=0777). As others pointed out, properly permissioning the folder and files to be owned by a user other than root would be prudent.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.