How do I define a "dropbox" type share with Samba?
Issue
- The following share definition will allow users of the gtest group to add files to the share
- The user will not be able to see the contents of the dropbox, and the admin user will be able to retrieve the files.
# mkdir /dropbox
# chown admin:dropgroup /dropbox
# chmod 770 /dropbox
The share is defined as:
[dropbox]
path = /dropbox
valid users = +dropgroup
admin users = admin
write list = +dropgroup
force group = dropgroup
read only = No
create mask = 0200
directory mask = 0770
hide unreadable = Yes
- Copying a file to the share as user1, it will result in the following file permissions:
# ls -la /dropbox
total 8
drwxrwx---. 2 admin dropgroup 39 Oct 5 10:27 .
drwxr-xr-x. 21 root root 4096 Oct 5 10:21 ..
--w-------. 1 user1 dropgroup 7 Oct 5 10:27 New Rich Text Document.rtf
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- samba-3.6.32*
- samba-4*
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.