4

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
gameboy@debian:~$ 
trzczy
  • 640
  • Related to https://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 03:32

1 Answers1

8
sudo mount -t cifs //MOC/php /home/gameboy/Pulpit/Windows-Share -o user=wat,username=gameboy,password=fakepassword,dir_mode=0777,file_mode=0777
trzczy
  • 640