
在 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