Solved

Guest user in Samba with full read / write / delete?

Posted on 2014-04-16
4
559 Views
Last Modified: 2014-04-16
I have a need to setup an unprotected network share where people can dump non-sensitive information.

The directory that we are using is owned by the user:group office:office (this is a Debian box).

What I want is:
1. Map the guest user to office
2. Allow the guest user (as office) to have complete permissions over the contents of this directory.

Currently, the share definition looks like this:
[trash]
	comment = Dump your crap here.
	path = /home/office/trash
	admin users = office
	read only = No
	create mask = 0777
	force create mode = 0777
	force security mode = 0777
	directory mask = 0777
	force directory mode = 0777
	force directory security mode = 0777
	guest ok = Yes
        guest user = office

Open in new window


...but when the clients try to delete a directory out of the trash share, it tells you that you don't have permissions.

What config am I missing?
0
Comment
Question by:DrDamnit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 21

Expert Comment

by:Mazdajai
ID: 40005514
Can you post smb.conf? Can clients delete file?
0
 
LVL 32

Author Comment

by:DrDamnit
ID: 40005577
[global]
      server string = %h server
      map to guest = Bad User
      obey pam restrictions = Yes
      pam password change = Yes
      passwd program = /usr/bin/passwd %u
      passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
      unix password sync = Yes
      syslog = 0
      log file = /var/log/samba/log.%m
      max log size = 1000
      dns proxy = No
      usershare allow guests = Yes
      panic action = /usr/share/samba/panic-action %d
      idmap config * : backend = tdb

[printers]
      comment = All Printers
      path = /var/spool/samba
      create mask = 0700
      printable = Yes
      print ok = Yes
      browseable = No

[trash]
      comment = Dump your crap here.
      path = /home/office/trash
      admin users = office
      read only = No
      create mask = 0777
      force create mode = 0777
      force security mode = 0777
      directory mask = 0777
      force directory mode = 0777
      force directory security mode = 0777
      guest ok = Yes
        guest user = office
0
 
LVL 32

Author Comment

by:DrDamnit
ID: 40005596
It seems to be a file system permissions problem. If I have a directory (d1) in the share with a file  in it (f1) and set the permissions for them both to 777, I can delete.

777 is not a good set of permissions to use.

It seems that since the files are owned by the user 'office', that if guest is mapped to office, then people accessing the shares should have '7' (rwx) access to the files. But, that's apparently not happening....

Why?
0
 
LVL 32

Accepted Solution

by:
DrDamnit earned 0 total points
ID: 40005616
Figured it out. guest account = office should have been a global setting, not a per-share setting since it is a user directive.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question