挂载 Windows 共享并为 root 和用户提供写权限

挂载 Windows 共享并为 root 和用户提供写权限

在 debian 上,我有 root 的写权限,但没有用户的写权限。我还没有对 smb.conf 进行任何更改,因此它是默认的。存在用户的读取权限。如何给用户添加写权限?

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:~$ 

答案1

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

相关内容