0

Ok, here is my smb.conf:

[global]

workgroup = workgroup
server string = %h
dns proxy = no

log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d

usershare allow guests = yes
security = user
map to guest = Bad Password
guest ok = yes
guest account = myguest
username map = /etc/samba/smbusers

[Public]
comment = Public Files
path = /media/store/Public
writeable = yes
guest ok = yes
create mask = 775
directory mask = 775

[myuser]
comment = My User Only
path = /media/store/myuser
guest ok = no
valid users = myuser
admin users = myuser
writeable = yes
create mask = 775
directory mask = 775


The issue I have is that the myuser share saves everything as root. If I remove the admin users line, it then saves them as my guest user. Never as myuser.
How can I set this up so that is just saves files and makes myuser the owner?

0

map to guest = Bad Password is causing any incorrect password to be accepted and mapped to the guest user -- even 'tho guest ok is no. Try setting it to Bad User instead. That way you are forced to provide the correct password for myuser. And remove admin user as that will force you to be root.

  • Ok, I changed that and it still comes out to myguest as the owner of the files created. – user277244 Jan 28 '14 at 23:14
  • See, what's crazy is that I need to enter in my user and password to gain access. It accepts my user and password, but files created are using the guest account. How does that happen? – user277244 Jan 28 '14 at 23:23
  • If I completely comment out the guest stuff at the top, the files are owned by nobody in the group nogroup – user277244 Jan 28 '14 at 23:28
0

Have you tried running:

chgrp myuser /media/store/myuser && chmod g+s /media/store/myuser

This will make it so any item in the folder or anything put in there in the future is given the owner of myuser.

Is this what you're trying to do?

  • chown will change the current files, but do nothing for new files. – Ricky Beam Jan 28 '14 at 23:03

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.