On debian I have write permission for root but not for user. I have not done any changes in smb.conf yet so it is default. Read permission for user is present. How to add write permission for user?

gameboy@debian:~$ sudo mount.cifs //MOC/php /home/gameboy/Pulpit/Windows-Share -o user=wat
Password for wat@//MOC/php:  ************* 
gameboy@debian:~$ touch /home/gameboy/Pulpit/Windows-Share/test2
touch: cannot touch ‘/home/gameboy/Pulpit/Windows-Share/test2’: Permission denied
gameboy@debian:~$ sudo -u root touch /home/gameboy/Pulpit/Windows-Share/test2
gameboy@debian:~$ ls -l /home/gameboy/Pulpit/Windows-Share/test2
-rwxr-xr-x 1 root root 0 Apr 26 21:23 /home/gameboy/Pulpit/Windows-Share/test2
  • Related to unix.stackexchange.com/a/68081 - and was what I ended up using. (though I didn't need root to be able to access - only a different user) – markm Sep 21 '18 at 3:32
sudo mount -t cifs //MOC/php /home/gameboy/Pulpit/Windows-Share -o user=wat,username=gameboy,password=fakepassword,dir_mode=0777,file_mode=0777
| improve this answer | |
  • This works!! After trying so many things, I am glad I found this solution. Thank you – Shravya Boggarapu Jun 6 '18 at 9:59

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.