I am attempting to mount a cifs drive in standard Ubuntu 12.04.2 LTS using the following line in /etc/fstab:
//server-name/share-name /mnt/archive cifs uid=1002,file_mode=0440,credentials=/etc/.smbcredentials,iocharset=utf8,sec=ntlmi 0 0
This mount will be used to store backups, so I would like to mount it with permissions to create files, but not delete them. Everything seems to be working as it should, except I can go in and delete away with nothing but a warning.
myuser@localhost:/mnt/archive$ ls -l -r--r----- 0 myuser root 51 Sep 19 17:56 deleteThis.txt -r--r----- 0 myuser root 51 Sep 19 17:31 deleteThis.txt.bak myuser@localhost:/mnt/archive$ rm deleteThis.txt.bak rm: remove write-protected regular file `deleteThis.txt.bak'? y myuser@localhost:/mnt/archive$ ls -l -r--r----- 0 myuser root 51 Sep 19 17:56 deleteThis.txt
Why are my file privileges not being respected? Is this an Ubuntu thing?
Is there a way to mount the network share through cifs without exposing the files to deletion?