I'm trying to get write permissions with Samba. What I did:

  • Created a new Ubuntu user: Username

  • Gave him ownership of my content directory

  • Username CAN write/change files in that directory via ssh. So the problem has to be with samba.

  • Created samba user via smbpasswd -a Username with the same Username and password as Ubuntu user

  • Changed my smb.config file:

      -guest ok = yes
      -read only = yes
      -write list = username
  • restarted server

If I connect to the samba share now, for example with Nautilus -> Connect to server -> smb://username@host (connecting works), I do not have write permissions on every file. There are some files, for which I have write permissions, and others, for which I don't.

Again, if I connect to the server with ssh and login as my Username, I have write permissions on every file.

What else to do? Thank you.

  • Did you change ownership of existing files with the directory? -gave him ownership of my content directory – jc__ Sep 25 '17 at 15:50
  • I used a recursive call: chown -R username:username directory, so he should be owner of every file in that directory. Also, he can delete existing files in the content directory via ssh. – Zatem Sep 25 '17 at 15:53
  • Can you do a ls -l filenameon one of the files you can't write to, and on one file you can write to? – vidarlo Sep 25 '17 at 17:14
  • Thank you. For some reason, the owner auf the files had no write permissions, but the group had write permissions. That made it so that I was able to write locally, but not if connected with samba. – Zatem Sep 28 '17 at 16:00

Your Answer

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

Browse other questions tagged or ask your own question.